MySQL 8.0.30
Source Code Documentation
my_aes_impl.h File Reference

Go to the source code of this file.


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


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...



Macro Definition Documentation


#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.

[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