Skip to content

AESEncryption

Derived AES256 Encryption class.

#include <AESEncryption.hpp>

Inherits from Encryption

Public Functions

Name
virtual std::vector< std::uint8_t > EncryptData(std::vector< std::uint8_t > data, std::vector< std::uint8_t > key_data) override
AES256 Encrytion method.
virtual std::vector< std::uint8_t > DecryptData(std::vector< std::uint8_t > data, std::vector< std::uint8_t > key_data) override
AES256 Decryption method.
virtual bool CheckEqual(const Encryption & lhs, const Encryption & rhs) const override
Checks if two AESEncryption instances are equal.

Additional inherited members

Public Functions inherited from Encryption

Name
virtual ~Encryption()
Virtual destructor to prevent memory leakage.
bool operator==(const Encryption & other) const
Overloads equality operator to CheckEqual.

Public Functions Documentation

function EncryptData

inline virtual std::vector< std::uint8_t > EncryptData(
    std::vector< std::uint8_t > data,
    std::vector< std::uint8_t > key_data
) override

AES256 Encrytion method.

Parameters:

  • data The data to be encrypted
  • key_data The key to be used for encryption

Return: Encrypted data

Reimplements: Encryption::EncryptData

function DecryptData

inline virtual std::vector< std::uint8_t > DecryptData(
    std::vector< std::uint8_t > data,
    std::vector< std::uint8_t > key_data
) override

AES256 Decryption method.

Parameters:

  • data The data to be decrypted
  • key_data The key to be used for decryption

Return: Decrypted data

Reimplements: Encryption::DecryptData

function CheckEqual

inline virtual bool CheckEqual(
    const Encryption & lhs,
    const Encryption & rhs
) const override

Checks if two AESEncryption instances are equal.

Parameters:

  • lhs First instance of Encryption to be downcasted
  • rhs Second instance of Encryption to be downcasted

Return: always return true, since no members

Reimplements: Encryption::CheckEqual


Updated on 2026-03-04 at 13:10:44 -0800