41#define MY_AES_IV_SIZE 16
44#define MY_AES_BLOCK_SIZE 16
68#define MY_AES_BEGIN my_aes_128_ecb
69#define MY_AES_END my_aes_256_ofb
72#define MY_AES_BAD_DATA -1
96 unsigned char *dest,
const unsigned char *
key,
98 const unsigned char *iv,
bool padding =
true,
99 vector<string> *kdf_options =
nullptr);
117 unsigned char *dest,
const unsigned char *
key,
119 const unsigned char *iv,
bool padding =
true,
120 vector<string> *kdf_options =
nullptr);
bool my_aes_needs_iv(my_aes_opmode opmode)
Return true if the AES cipher and block mode requires an IV.
Definition: my_aes_openssl.cc:255
int my_aes_encrypt(const unsigned char *source, uint32 source_length, unsigned char *dest, const unsigned char *key, uint32 key_length, enum my_aes_opmode mode, const unsigned char *iv, bool padding=true, vector< string > *kdf_options=nullptr)
Encrypt a buffer using AES.
Definition: my_aes_openssl.cc:146
my_aes_opmode
Supported AES cipher/block mode combos.
Definition: my_aes.h:47
@ my_aes_256_cbc
Definition: my_aes.h:53
@ my_aes_128_cbc
Definition: my_aes.h:51
@ my_aes_128_cfb128
Definition: my_aes.h:60
@ my_aes_128_ofb
Definition: my_aes.h:63
@ my_aes_256_cfb1
Definition: my_aes.h:56
@ my_aes_128_cfb1
Definition: my_aes.h:54
@ my_aes_192_cfb8
Definition: my_aes.h:58
@ my_aes_192_ofb
Definition: my_aes.h:64
@ my_aes_128_ecb
Definition: my_aes.h:48
@ my_aes_192_cfb1
Definition: my_aes.h:55
@ my_aes_256_ecb
Definition: my_aes.h:50
@ my_aes_192_ecb
Definition: my_aes.h:49
@ my_aes_128_cfb8
Definition: my_aes.h:57
@ my_aes_192_cfb128
Definition: my_aes.h:61
@ my_aes_256_cfb8
Definition: my_aes.h:59
@ my_aes_256_ofb
Definition: my_aes.h:65
@ my_aes_192_cbc
Definition: my_aes.h:52
@ my_aes_256_cfb128
Definition: my_aes.h:62
longlong my_aes_get_size(uint32 source_length, enum my_aes_opmode opmode)
Calculate the size of a buffer large enough for encrypted data.
Definition: my_aes_openssl.cc:244
const char * my_aes_opmode_names[]
String representations of the supported AES modes.
Definition: my_aes_openssl.cc:50
int my_aes_decrypt(const unsigned char *source, uint32 source_length, unsigned char *dest, const unsigned char *key, uint32 key_length, enum my_aes_opmode mode, const unsigned char *iv, bool padding=true, vector< string > *kdf_options=nullptr)
Decrypt an AES encrypted buffer.
Definition: my_aes_openssl.cc:193
Some integer typedefs for easier portability.
long long int longlong
Definition: my_inttypes.h:54
uint32_t uint32
Definition: my_inttypes.h:66
mode
Definition: file_handle.h:59
std::vector< T, ut::allocator< T > > vector
Specialization of vector which uses allocator.
Definition: ut0new.h:2873
required string key
Definition: replication_asynchronous_connection_failover.proto:59
repeated Source source
Definition: replication_asynchronous_connection_failover.proto:41