![]() |
semf
|
Abstract class for AES-CBC (Advanced Encryption Standard-Cipher Block Chaining) for symmetric encryption/decryption. More...
#include <aescbc.h>
Public Types | |
enum | State : bool { Ok = true , Error = false } |
Public Member Functions | |
virtual | ~AesCbc ()=default |
virtual void | setKey (const uint8_t key[], size_t size)=0 |
Sets the AES key. More... | |
virtual void | setInitializationVector (const uint8_t initializationVector[])=0 |
Sets the initialization vector. More... | |
virtual void | resetInitializationVector ()=0 |
virtual State | encrypt (const uint8_t dataIn[], uint8_t bufferOut[], size_t size)=0 |
Encrypts the given data using AES-CBC algorithm. More... | |
virtual State | decrypt (const uint8_t dataIn[], uint8_t bufferOut[], size_t size)=0 |
Performs an AES-CBC decryption on the given (encrypted) data. More... | |
Abstract class for AES-CBC (Advanced Encryption Standard-Cipher Block Chaining) for symmetric encryption/decryption.
enum semf::app::AesCbc::State : bool |
|
virtualdefault |
|
pure virtual |
Performs an AES-CBC decryption on the given (encrypted) data.
dataIn | Input data which has to be decrypted. |
bufferOut | Decrypted data. |
size | Size of input data in bytes. It must be a multiple of the block size (16 Bytes). |
State::Ok
on success and State::Error
on failure.
|
pure virtual |
Encrypts the given data using AES-CBC algorithm.
dataIn | Input data which has to be encrypted. |
bufferOut | Encrypted data. |
size | Size of input data in bytes. it must be a multiple of the block size (16 Bytes). |
State::Ok
on success and State::Error
on failure.
|
pure virtual |
Resets the initialization vector.
|
pure virtual |
Sets the initialization vector.
initializationVector | Pointer to the address of the initialization vector (as binary). |
|
pure virtual |
Sets the AES key.
key | Pointer to the address of the key (as binary). |
size | Size of the key in bytes. |