AES_set_encrypt_key

Expand a user key into an AES encryption key schedule (deprecated; prefer EVP).

Synopsis

Declared in <openssl/aes.h>

[[deprecated]]
int
AES_set_encrypt_key(
    unsigned char const* userKey,
    int const bits,
    AES_KEY* key);

WARNING

Deprecated. Use of this entity is allowed but discouraged.

Return Value

0 on success, or a negative value on error.

Parameters

NameDescription
userKeyRaw AES key bytes (16, 24, or 32 bytes for 128/192/256-bit).
bitsKey length in bits (128, 192, or 256).
keyDestination expanded key schedule for AES_encrypt() and encrypting modes.