7 #ifndef FABCOIN_CRYPTO_AES_H 8 #define FABCOIN_CRYPTO_AES_H 14 static const int AES_BLOCKSIZE = 16;
15 static const int AES128_KEYSIZE = 16;
16 static const int AES256_KEYSIZE = 32;
27 void Encrypt(
unsigned char ciphertext[16],
const unsigned char plaintext[16])
const;
39 void Decrypt(
unsigned char plaintext[16],
const unsigned char ciphertext[16])
const;
51 void Encrypt(
unsigned char ciphertext[16],
const unsigned char plaintext[16])
const;
63 void Decrypt(
unsigned char plaintext[16],
const unsigned char ciphertext[16])
const;
69 AES256CBCEncrypt(
const unsigned char key[AES256_KEYSIZE],
const unsigned char ivIn[AES_BLOCKSIZE],
bool padIn);
71 int Encrypt(
const unsigned char*
data,
int size,
unsigned char* out)
const;
76 unsigned char iv[AES_BLOCKSIZE];
82 AES256CBCDecrypt(
const unsigned char key[AES256_KEYSIZE],
const unsigned char ivIn[AES_BLOCKSIZE],
bool padIn);
84 int Decrypt(
const unsigned char*
data,
int size,
unsigned char* out)
const;
89 unsigned char iv[AES_BLOCKSIZE];
95 AES128CBCEncrypt(
const unsigned char key[AES128_KEYSIZE],
const unsigned char ivIn[AES_BLOCKSIZE],
bool padIn);
97 int Encrypt(
const unsigned char*
data,
int size,
unsigned char* out)
const;
102 unsigned char iv[AES_BLOCKSIZE];
108 AES128CBCDecrypt(
const unsigned char key[AES128_KEYSIZE],
const unsigned char ivIn[AES_BLOCKSIZE],
bool padIn);
110 int Decrypt(
const unsigned char*
data,
int size,
unsigned char* out)
const;
115 unsigned char iv[AES_BLOCKSIZE];
118 #endif // FABCOIN_CRYPTO_AES_H
A decryption class for AES-256.
AES128Encrypt(const unsigned char key[16])
An encryption class for AES-256.
void Encrypt(unsigned char ciphertext[16], const unsigned char plaintext[16]) const
A decryption class for AES-128.
uint8_t const size_t const size
An encryption class for AES-128.