MySQL 8.0.40
Source Code Documentation
|
#include <sys/types.h>
#include "m_string.h"
#include "my_aes.h"
#include "my_inttypes.h"
#include "mysys/my_aes_impl.h"
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... | |
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] | key | Key to use for real key creation |
[in] | key_length | Length of the key |
[out] | rkey | Real key (used by OpenSSL) |
[out] | opmode | encryption mode |