AES-192 encryption class (running in Cipher Block Chaining mode) More...

#include <aes192_encrypt.h>

Public Member Functions

virtual void add (const void *data, int size)=0
 Adds data to be encrypted. More...
 
virtual void add (const DataBufferPtr &data)=0
 Add data to be encrypted. More...
 
virtual void calculate ()=0
 Finalize encryption. More...
 
virtual DataBufferPtr data () const =0
 Get encrypted data. More...
 
virtual void reset ()=0
 Resets the encryption. More...
 
virtual void set_iv (const unsigned char iv[iv_size])=0
 Sets the initialisation vector. More...
 
virtual void set_key (const unsigned char key[key_size])=0
 Sets the cipher key. More...
 
virtual void set_padding (bool value=true, bool use_pkcs7=true, unsigned int num_additional_padded_blocks=0)=0
 Enable AES Padding. More...
 

Static Public Member Functions

static std::shared_ptr< AES192_Encryptcreate ()
 Constructs a AES-192 generator (running in Cipher Block Chaining mode) More...
 

Static Public Attributes

static const int block_size = 16
 
static const int iv_size = 16
 
static const int key_size = 24
 

Detailed Description

AES-192 encryption class (running in Cipher Block Chaining mode)

Member Function Documentation

virtual void uicore::AES192_Encrypt::add ( const void *  data,
int  size 
)
pure virtual

Adds data to be encrypted.

virtual void uicore::AES192_Encrypt::add ( const DataBufferPtr data)
pure virtual

Add data to be encrypted.

Parameters
data= Data Buffer
virtual void uicore::AES192_Encrypt::calculate ( )
pure virtual

Finalize encryption.

static std::shared_ptr<AES192_Encrypt> uicore::AES192_Encrypt::create ( )
static

Constructs a AES-192 generator (running in Cipher Block Chaining mode)

virtual DataBufferPtr uicore::AES192_Encrypt::data ( ) const
pure virtual

Get encrypted data.

This is the databuffer used internally to store the encrypted data. You may call "set_size()" to clear the buffer, inbetween calls to "add()" You may call "set_capacity()" to optimise storage requirements before the add() call

virtual void uicore::AES192_Encrypt::reset ( )
pure virtual

Resets the encryption.

virtual void uicore::AES192_Encrypt::set_iv ( const unsigned char  iv[iv_size])
pure virtual

Sets the initialisation vector.

This should be a random number
This must be called before the initial add()

virtual void uicore::AES192_Encrypt::set_key ( const unsigned char  key[key_size])
pure virtual

Sets the cipher key.

This must be called before the initial add()

virtual void uicore::AES192_Encrypt::set_padding ( bool  value = true,
bool  use_pkcs7 = true,
unsigned int  num_additional_padded_blocks = 0 
)
pure virtual

Enable AES Padding.

Example (use_pkcs7==true) : ... 0x03 0x03 0x03 (3 octets of padding) Example (use_pkcs7==false) : ... 0x02 0x02 0x02 (3 octets of padding, the last octet is the length)

Parameters
value= true = Enable padding (default)
use_pkcs7= true = This uses the PKCS#7/RFC3369 method (Enabled by default). false = use the TLS method (rfc2246)
num_additional_padded_blocks= (Only valid when use_pkcs7==false). Set to "frustrate attacks on a protocol based on analysis of the lengths of exchanged messages". (Range 0 to 15)

Member Data Documentation

const int uicore::AES192_Encrypt::block_size = 16
static
const int uicore::AES192_Encrypt::iv_size = 16
static
const int uicore::AES192_Encrypt::key_size = 24
static

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