plusaes
plusaes Namespace Reference

Enumerations

enum  Error {
  kErrorOk = 0 , kErrorInvalidDataSize = 1 , kErrorInvalidKeySize , kErrorInvalidBufferSize ,
  kErrorInvalidKey , kErrorDeprecated , kErrorInvalidIvSize , kErrorInvalidTagSize ,
  kErrorInvalidTag
}
 

Functions

unsigned int version ()
 
std::vector< unsigned char > key_from_string (const char(*key_str)[17])
 
std::vector< unsigned char > key_from_string (const char(*key_str)[25])
 
std::vector< unsigned char > key_from_string (const char(*key_str)[33])
 
unsigned long get_padded_encrypted_size (const unsigned long data_size)
 
Error encrypt_ecb (const unsigned char *data, const unsigned long data_size, const unsigned char *key, const unsigned long key_size, unsigned char *encrypted, const unsigned long encrypted_size, const bool pads)
 
Error decrypt_ecb (const unsigned char *data, const unsigned long data_size, const unsigned char *key, const unsigned long key_size, unsigned char *decrypted, const unsigned long decrypted_size, unsigned long *padded_size)
 
Error encrypt_cbc (const unsigned char *data, const unsigned long data_size, const unsigned char *key, const unsigned long key_size, const unsigned char(*iv)[16], unsigned char *encrypted, const unsigned long encrypted_size, const bool pads)
 
Error decrypt_cbc (const unsigned char *data, const unsigned long data_size, const unsigned char *key, const unsigned long key_size, const unsigned char(*iv)[16], unsigned char *decrypted, const unsigned long decrypted_size, unsigned long *padded_size)
 
Error encrypt_gcm (unsigned char *data, const std::size_t data_size, const unsigned char *aadata, const std::size_t aadata_size, const unsigned char *key, const std::size_t key_size, const unsigned char *iv, const std::size_t iv_size, unsigned char *tag, const std::size_t tag_size)
 
Error encrypt_gcm (unsigned char *data, const std::size_t data_size, const unsigned char *aadata, const std::size_t aadata_size, const unsigned char *key, const std::size_t key_size, const unsigned char(*iv)[12], unsigned char(*tag)[16])
 
Error decrypt_gcm (unsigned char *data, const std::size_t data_size, const unsigned char *aadata, const std::size_t aadata_size, const unsigned char *key, const std::size_t key_size, const unsigned char *iv, const std::size_t iv_size, const unsigned char *tag, const std::size_t tag_size)
 
Error decrypt_gcm (unsigned char *data, const std::size_t data_size, const unsigned char *aadata, const std::size_t aadata_size, const unsigned char *key, const std::size_t key_size, const unsigned char(*iv)[12], const unsigned char(*tag)[16])
 
Error crypt_ctr (unsigned char *data, const std::size_t data_size, const unsigned char *key, const std::size_t key_size, const unsigned char(*nonce)[16])
 

Detailed Description

AES cipher APIs