RLib  5.7
RLib - an opensource, lightweight and multi-platform framework for cpp programming
System::Security::Cryptography::AES Class Reference

AES encryption algorithm More...

Public Member Functions

 AES (const void *lpkey, intptr_t key_bits)
 AES-ECB initiation More...
 
bool Encrypt (const void *lpdata, OUT void *lpout)
 AES-ECB block encryption More...
 
bool Decrypt (const void *lpdata, OUT void *lpout)
 AES-ECB block decryption More...
 

Static Public Member Functions

static bool encrypt_cbc (const void *lpdata, intptr_t datasize, const void *lpkey, intptr_t key_bits, const void *lpiv, OUT void *lpout)
 AES-CBC buffer encryption More...
 
static bool decrypt_cbc (const void *lpdata, intptr_t datasize, const void *lpkey, intptr_t key_bits, const void *lpiv, OUT void *lpout)
 AES-CBC buffer decryption More...
 

Public Attributes

 RLIB_DECLARE_DYNCREATE
 

Detailed Description

AES encryption algorithm

Constructor & Destructor Documentation

AES::AES ( const void *  lpkey,
intptr_t  key_bits 
)

AES-ECB initiation

Parameters
lpkeyencryption/decryption key
key_bitsmust be 128, 192 or 256 bits

Member Function Documentation

bool AES::Decrypt ( const void *  lpdata,
OUT void *  lpout 
)

AES-ECB block decryption

Parameters
lpdatabuffer holding the input data, 16 bytes
lpoutoutput buffer, 16 bytes
Returns
true if successful
bool AES::decrypt_cbc ( const void *  lpdata,
intptr_t  datasize,
const void *  lpkey,
intptr_t  key_bits,
const void *  lpiv,
OUT void *  lpout 
)
static

AES-CBC buffer decryption

Parameters
lpdatabuffer holding the input data
datasizeshould be a multiple of the block size (16 bytes)
lpkeydecryption key
key_bitsmust be 128, 192 or 256 bits
lpivinitialization vector, 16 bytes
lpoutoutput buffer, [datasize] bytes in total
Returns
true if successful
bool AES::Encrypt ( const void *  lpdata,
OUT void *  lpout 
)

AES-ECB block encryption

Parameters
lpdatabuffer holding the input data, 16 bytes
lpoutoutput buffer, 16 bytes
Returns
true if successful
bool AES::encrypt_cbc ( const void *  lpdata,
intptr_t  datasize,
const void *  lpkey,
intptr_t  key_bits,
const void *  lpiv,
OUT void *  lpout 
)
static

AES-CBC buffer encryption

Parameters
lpdatabuffer holding the input data
datasizeshould be a multiple of the block size (16 bytes)
lpkeyencryption key
key_bitsmust be 128, 192 or 256 bits
lpivinitialization vector, 16 bytes
lpoutoutput buffer, [datasize] bytes in total
Returns
true if successful

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