Rudiments
Public Member Functions | List of all members
aes128 Class Reference

#include <aes128.h>

Inherits encryption.

Public Member Functions

 aes128 ()
 
 ~aes128 ()
 
size_t getKeySize ()
 
size_t getIvSize ()
 
const byte_t * getEncryptedData ()
 
const byte_t * getDecryptedData ()
 
- Public Member Functions inherited from encryption
 encryption ()
 
virtual ~encryption ()
 
virtual bool setKey (const byte_t *key, size_t keysize)
 
virtual void setRandomKey ()
 
virtual byte_t * getKey ()
 
virtual bool setIv (const byte_t *iv, size_t ivsize)
 
virtual void setRandomIv ()
 
virtual byte_t * getIv ()
 
virtual bool append (const byte_t *data, uint32_t size)
 
virtual uint64_t getEncryptedDataSize ()
 
virtual uint64_t getDecryptedDataSize ()
 
virtual encryptionerror_t getError ()
 
virtual bool clear ()
 
virtual bool reset ()
 
- Public Member Functions inherited from object
virtual ~object ()
 

Detailed Description

The aes128 class provides a simple aes128 implementation.

Constructor & Destructor Documentation

◆ aes128()

aes128::aes128 ( )

Creates an instance of the aes128 class.

◆ ~aes128()

aes128::~aes128 ( )

Deletes this instance of the aes128 class.

Member Function Documentation

◆ getDecryptedData()

const byte_t * aes128::getDecryptedData ( )
virtual

Interprets the current data as encrypted. Decrypts the current data. Returns the decrypted data on success or NULL if an error occurred. Note that the decrypted data returned will be an empty string if no data has been appended yet.

Implements encryption.

◆ getEncryptedData()

const byte_t * aes128::getEncryptedData ( )
virtual

Interprets the current data as unencrypted. Encrypts the current data. Returns the encrypted data on success or NULL if an error occurred. Note that the encrypted data returned will be an empty string if no data has been appended yet.

Implements encryption.

◆ getIvSize()

size_t aes128::getIvSize ( )
virtual

Returns the number of bytes in the initialization vector.

Implements encryption.

◆ getKeySize()

size_t aes128::getKeySize ( )
virtual

Returns the number of bytes in the key.

Implements encryption.