MCPcopy Create free account
hub / github.com/apple/foundationdb / DecryptionStreamCipher

Method DecryptionStreamCipher

flow/StreamCipher.cpp:148–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148DecryptionStreamCipher::DecryptionStreamCipher(const StreamCipherKey* key, const StreamCipher::IV& iv)
149 : cipher(key->size()) {
150 EVP_DecryptInit_ex(cipher.getCtx(), EVP_aes_256_gcm(), nullptr, nullptr, nullptr);
151 EVP_CIPHER_CTX_ctrl(cipher.getCtx(), EVP_CTRL_AEAD_SET_IVLEN, iv.size(), nullptr);
152 EVP_DecryptInit_ex(cipher.getCtx(), nullptr, nullptr, key->data(), iv.data());
153}
154
155StringRef DecryptionStreamCipher::decrypt(unsigned char const* ciphertext, int len, Arena& arena) {
156 CODE_PROBE(true, "Decrypting data with StreamCipher");

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
getCtxMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected