TinyAES++  v0.0.1-2438
C++ API for TinyAES
TinyAES.hpp File Reference
#include <string>
#include <vector>
#include <cstdint>
Include dependency graph for TinyAES.hpp:
This graph shows which files directly or indirectly include this file:

Namespaces

 TinyAES
 TinyAES provides a few variants of the encryption/decryption methods in the AES family.
 

Typedefs

typedef std::vector< uint8_t > TinyAES::VBytes
 A vector of bytes. More...
 

Functions

void TinyAES::validate_key_and_iv (const VBytes &key, const VBytes &iv)
 Used internally to validate the length of both the key and the initialization vector. More...
 
void TinyAES::generate_random_key_and_iv (VBytes &key, VBytes &iv, size_t seed=0)
 Generate a random 256-bit key and a 128-bit initialization vector. More...
 
std::string TinyAES::to_hex_string (const VBytes &v)
 Convert the vector into a text string of hex characters. More...
 
VBytes TinyAES::from_hex_string (const std::string &str)
 Convert the text string back into a vector of bytes. More...
 
std::string TinyAES::cbc_encrypt (const std::string &str, const VBytes &key, const VBytes &iv)
 Encrypt the input buffer using 256-bit AES Cipher Block Chaining mode. More...
 
VBytes TinyAES::cbc_encrypt (const VBytes &input, const VBytes &key, const VBytes &iv)
 Encrypt the input buffer using 256-bit AES Cipher Block Chaining mode. More...
 
std::string TinyAES::cbc_decrypt (const std::string &input, const VBytes &key, const VBytes &iv)
 Decrypt the buffer using 256-bit AES Cipher Block Chaining mode. More...
 
VBytes TinyAES::cbc_decrypt (const VBytes &input, const VBytes &key, const VBytes &iv)
 Decrypt the input buffer using 256-bit AES Cipher Block Chaining mode. More...
 

Variables

const size_t TinyAES::key_size_in_bytes = 32
 The number of bytes in a key, which is 32 for 256-bit AES. More...
 
const size_t TinyAES::iv_size_in_bytes = 16
 The number of bytes in the initialization vector. More...