Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Protected Attributes | List of all members
cAesCfb128Encryptor Class Reference

Encrypts data using the AES / CFB (128) algorithm. More...

#include <AesCfb128Encryptor.h>

Public Member Functions

 cAesCfb128Encryptor (void)
 
void Init (const Byte a_Key[16], const Byte a_IV[16])
 Initializes the decryptor with the specified Key / IV. More...
 
bool IsValid (void) const
 Returns true if the object has been initialized with the Key / IV. More...
 
void ProcessData (std::byte *a_PlainIn, size_t a_Length)
 Encrypts a_Length bytes of the plain data in-place; produces a_Length output bytes. More...
 
 ~cAesCfb128Encryptor ()
 

Protected Attributes

mbedtls_aes_context m_Aes
 
bool m_IsValid
 Indicates whether the object has been initialized with the Key / IV. More...
 
Byte m_IV [16]
 The InitialVector, used by the CFB mode encryption. More...
 

Detailed Description

Encrypts data using the AES / CFB (128) algorithm.

Definition at line 19 of file AesCfb128Encryptor.h.

Constructor & Destructor Documentation

◆ cAesCfb128Encryptor()

cAesCfb128Encryptor::cAesCfb128Encryptor ( void  )

Definition at line 13 of file AesCfb128Encryptor.cpp.

◆ ~cAesCfb128Encryptor()

cAesCfb128Encryptor::~cAesCfb128Encryptor ( )

Definition at line 23 of file AesCfb128Encryptor.cpp.

Member Function Documentation

◆ Init()

void cAesCfb128Encryptor::Init ( const Byte  a_Key[16],
const Byte  a_IV[16] 
)

Initializes the decryptor with the specified Key / IV.

Definition at line 33 of file AesCfb128Encryptor.cpp.

◆ IsValid()

bool cAesCfb128Encryptor::IsValid ( void  ) const
inline

Returns true if the object has been initialized with the Key / IV.

Definition at line 33 of file AesCfb128Encryptor.h.

◆ ProcessData()

void cAesCfb128Encryptor::ProcessData ( std::byte *  a_PlainIn,
size_t  a_Length 
)

Encrypts a_Length bytes of the plain data in-place; produces a_Length output bytes.

Definition at line 46 of file AesCfb128Encryptor.cpp.

Member Data Documentation

◆ m_Aes

mbedtls_aes_context cAesCfb128Encryptor::m_Aes
protected

Definition at line 37 of file AesCfb128Encryptor.h.

◆ m_IsValid

bool cAesCfb128Encryptor::m_IsValid
protected

Indicates whether the object has been initialized with the Key / IV.

Definition at line 43 of file AesCfb128Encryptor.h.

◆ m_IV

Byte cAesCfb128Encryptor::m_IV[16]
protected

The InitialVector, used by the CFB mode encryption.

Definition at line 40 of file AesCfb128Encryptor.h.


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