MCPcopy Create free account
hub / github.com/Snapchat/Valdi / AesEncryptor

Method AesEncryptor

libs/utils/src/utils/crypto/AesEncryptor.cpp:14–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12constexpr auto kTag = "[utils][AesEncryptor]";
13
14AesEncryptor::AesEncryptor(const AesEncryptor::Key& key, const AesEncryptor::Iv& iv)
15 : _cipher(EVP_aead_aes_128_gcm()), _key(key), _iv(iv) {
16 SC_ASSERT(_key.size() == EVP_AEAD_key_length(_cipher));
17 SC_ASSERT(_iv.size() == EVP_AEAD_nonce_length(_cipher));
18}
19
20AesEncryptor::AesEncryptor(const bssl::Span<uint8_t>& key, const bssl::Span<uint8_t>& iv)
21 : _cipher(EVP_aead_aes_128_gcm()), _key{}, _iv{} {

Callers

nothing calls this directly

Calls 3

minFunction · 0.85
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected