Home
last modified time | relevance | path

Searched refs:GCM_NONCE_BYTES (Results 1 – 1 of 1) sorted by relevance

/system/vold/
DKeyStorage.cpp58 static constexpr size_t GCM_NONCE_BYTES = 12; variable
210 if (!checkSize("nonce", nonce.size(), GCM_NONCE_BYTES)) return false; in encryptWithKeymasterKey()
224 auto nonce = ciphertext.substr(0, GCM_NONCE_BYTES); in decryptWithKeymasterKey()
225 auto bodyAndMac = ciphertext.substr(GCM_NONCE_BYTES); in decryptWithKeymasterKey()
311 if (!readRandomBytesOrLog(GCM_NONCE_BYTES, ciphertext)) return false; in encryptWithoutKeymaster()
324 ciphertext->resize(GCM_NONCE_BYTES + plaintext.size() + GCM_MAC_BYTES); in encryptWithoutKeymaster()
327 reinterpret_cast<uint8_t*>(&(*ciphertext)[0] + GCM_NONCE_BYTES), &outlen, in encryptWithoutKeymaster()
337 … reinterpret_cast<uint8_t*>(&(*ciphertext)[0] + GCM_NONCE_BYTES + plaintext.size()), &outlen)) { in encryptWithoutKeymaster()
346 reinterpret_cast<uint8_t*>(&(*ciphertext)[0] + GCM_NONCE_BYTES + plaintext.size()))) { in encryptWithoutKeymaster()
355 if (ciphertext.size() < GCM_NONCE_BYTES + GCM_MAC_BYTES) { in decryptWithoutKeymaster()
[all …]