18#ifndef Trinity_AES_h__
19#define Trinity_AES_h__
24#include <openssl/evp.h>
31 static constexpr size_t IV_SIZE_BYTES = 12;
32 static constexpr size_t KEY_SIZE_BYTES = 16;
33 static constexpr size_t TAG_SIZE_BYTES = 12;
35 using IV = std::array<uint8, IV_SIZE_BYTES>;
36 using Key = std::array<uint8, KEY_SIZE_BYTES>;
39 AES(
bool encrypting,
size_t keySizeBits = 128);
46 void Init(
Key const& key);
47 void Init(std::span<uint8 const> key);
50 bool ProcessNoIntegrityCheck(
IV const& iv,
uint8* data,
size_t partialLength);
uint8[TAG_SIZE_BYTES] Tag
AES & operator=(AES &&)=delete
std::array< uint8, IV_SIZE_BYTES > IV
AES & operator=(AES const &)=delete
std::array< uint8, KEY_SIZE_BYTES > Key