• Home
  • Raw
  • Download

Lines Matching refs:ciphertext

372                                    std::string* ciphertext) {  in encryptWithKeystoreKey()  argument
392 *ciphertext = nonce + body + mac; in encryptWithKeystoreKey()
398 const std::string& ciphertext, KeyBuffer* message) { in decryptWithKeystoreKey() argument
399 const std::string nonce = ciphertext.substr(0, GCM_NONCE_BYTES); in decryptWithKeystoreKey()
400 auto bodyAndMac = ciphertext.substr(GCM_NONCE_BYTES); in decryptWithKeystoreKey()
435 std::string* ciphertext) { in encryptWithoutKeystore() argument
439 if (!readRandomBytesOrLog(GCM_NONCE_BYTES, ciphertext)) return false; in encryptWithoutKeystore()
448 reinterpret_cast<const uint8_t*>(ciphertext->data()))) { in encryptWithoutKeystore()
452 ciphertext->resize(GCM_NONCE_BYTES + plaintext.size() + GCM_MAC_BYTES); in encryptWithoutKeystore()
455 ctx.get(), reinterpret_cast<uint8_t*>(&(*ciphertext)[0] + GCM_NONCE_BYTES), in encryptWithoutKeystore()
466 reinterpret_cast<uint8_t*>(&(*ciphertext)[0] + GCM_NONCE_BYTES + plaintext.size()), in encryptWithoutKeystore()
476 reinterpret_cast<uint8_t*>(&(*ciphertext)[0] + GCM_NONCE_BYTES + in encryptWithoutKeystore()
484 static bool decryptWithoutKeystore(const std::string& preKey, const std::string& ciphertext, in decryptWithoutKeystore() argument
486 if (ciphertext.size() < GCM_NONCE_BYTES + GCM_MAC_BYTES) { in decryptWithoutKeystore()
487 LOG(ERROR) << "GCM ciphertext too small: " << ciphertext.size(); in decryptWithoutKeystore()
501 reinterpret_cast<const uint8_t*>(ciphertext.data()))) { in decryptWithoutKeystore()
505 *plaintext = KeyBuffer(ciphertext.size() - GCM_NONCE_BYTES - GCM_MAC_BYTES); in decryptWithoutKeystore()
508 … reinterpret_cast<const uint8_t*>(ciphertext.data() + GCM_NONCE_BYTES), in decryptWithoutKeystore()
519 ciphertext.data() + GCM_NONCE_BYTES + plaintext->size())))) { in decryptWithoutKeystore()