TrinityCore
Trinity::Crypto::AES Class Reference

#include <AES.h>

Public Types

using IV = std::array< uint8, IV_SIZE_BYTES >
 
using Key = std::array< uint8, KEY_SIZE_BYTES >
 
using Tag = uint8[TAG_SIZE_BYTES]
 

Public Member Functions

 AES (bool encrypting)
 
 ~AES ()
 
void Init (Key const &key)
 
bool Process (IV const &iv, uint8 *data, size_t length, Tag &tag)
 
bool ProcessNoIntegrityCheck (IV const &iv, uint8 *data, size_t partialLength)
 

Static Public Attributes

static constexpr size_t IV_SIZE_BYTES = 12
 
static constexpr size_t KEY_SIZE_BYTES = 16
 
static constexpr size_t TAG_SIZE_BYTES = 12
 

Private Attributes

EVP_CIPHER_CTX * _ctx
 
bool _encrypting
 

Detailed Description

Definition at line 27 of file AES.h.

Member Typedef Documentation

◆ IV

Definition at line 34 of file AES.h.

◆ Key

Definition at line 35 of file AES.h.

◆ Tag

Definition at line 36 of file AES.h.

Constructor & Destructor Documentation

◆ AES()

Trinity::Crypto::AES::AES ( bool  encrypting)

Definition at line 22 of file AES.cpp.

◆ ~AES()

Trinity::Crypto::AES::~AES ( )

Definition at line 29 of file AES.cpp.

Member Function Documentation

◆ Init()

void Trinity::Crypto::AES::Init ( Key const &  key)

Definition at line 34 of file AES.cpp.

+ Here is the caller graph for this function:

◆ Process()

bool Trinity::Crypto::AES::Process ( IV const &  iv,
uint8 data,
size_t  length,
Tag tag 
)

Definition at line 40 of file AES.cpp.

+ Here is the caller graph for this function:

◆ ProcessNoIntegrityCheck()

bool Trinity::Crypto::AES::ProcessNoIntegrityCheck ( IV const &  iv,
uint8 data,
size_t  partialLength 
)

Definition at line 67 of file AES.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ _ctx

EVP_CIPHER_CTX* Trinity::Crypto::AES::_ctx
private

Definition at line 47 of file AES.h.

◆ _encrypting

bool Trinity::Crypto::AES::_encrypting
private

Definition at line 48 of file AES.h.

◆ IV_SIZE_BYTES

constexpr size_t Trinity::Crypto::AES::IV_SIZE_BYTES = 12
staticconstexpr

Definition at line 30 of file AES.h.

◆ KEY_SIZE_BYTES

constexpr size_t Trinity::Crypto::AES::KEY_SIZE_BYTES = 16
staticconstexpr

Definition at line 31 of file AES.h.

◆ TAG_SIZE_BYTES

constexpr size_t Trinity::Crypto::AES::TAG_SIZE_BYTES = 12
staticconstexpr

Definition at line 32 of file AES.h.


The documentation for this class was generated from the following files: