MySQL 9.0.0
Source Code Documentation
my_aes_impl.h File Reference

Go to the source code of this file.

Macros

#define MAX_AES_KEY_LENGTH   256
 Maximum supported key length. More...
 

Functions

void my_aes_create_key (const unsigned char *key, uint key_length, uint8 *rkey, enum my_aes_opmode opmode)
 Transforms an arbitrary long key into a fixed length AES key. More...
 

Variables

uint * my_aes_opmode_key_sizes
 

Macro Definition Documentation

◆ MAX_AES_KEY_LENGTH

#define MAX_AES_KEY_LENGTH   256

Maximum supported key length.

Function Documentation

◆ my_aes_create_key()

void my_aes_create_key ( const unsigned char *  key,
uint  key_length,
uint8 rkey,
enum my_aes_opmode  opmode 
)

Transforms an arbitrary long key into a fixed length AES key.

AES keys are of fixed length. This routine takes an arbitrary long key iterates over it in AES key length increment and XORs the bytes with the AES key buffer being prepared. The bytes from the last incomplete iteration are XORed to the start of the key until their depletion. Needed since crypto function routines expect a fixed length key.

Parameters
[in]keyKey to use for real key creation
[in]key_lengthLength of the key
[out]rkeyReal key (used by OpenSSL)
[out]opmodeencryption mode

Variable Documentation

◆ my_aes_opmode_key_sizes

uint* my_aes_opmode_key_sizes
extern