| 139 | } |
| 140 | |
| 141 | StringRef EncryptionStreamCipher::finish(Arena& arena) { |
| 142 | auto ciphertext = new (arena) unsigned char[AES_BLOCK_SIZE]; |
| 143 | int bytes{ 0 }; |
| 144 | EVP_EncryptFinal_ex(cipher.getCtx(), ciphertext, &bytes); |
| 145 | return StringRef(ciphertext, bytes); |
| 146 | } |
| 147 | |
| 148 | DecryptionStreamCipher::DecryptionStreamCipher(const StreamCipherKey* key, const StreamCipher::IV& iv) |
| 149 | : cipher(key->size()) { |
no test coverage detected