AES_wrap_key

Wrap (encrypt) a key with AES Key Wrap per RFC 3394 (deprecated; prefer EVP).

Synopsis

Declared in <openssl/aes.h>

[[deprecated]]
int
AES_wrap_key(
    AES_KEY* key,
    unsigned char const* iv,
    unsigned char* out,
    unsigned char const* in,
    unsigned int inlen);

WARNING

Deprecated. Use of this entity is allowed but discouraged.

Return Value

Length of wrapped data written to out, or a negative value on error.

Parameters

NameDescription
keyExpanded AES key used as the Key Encryption Key.
ivOptional 8-byte integrity check value, or NULL for the default IV.
outBuffer for the wrapped key (at least inlen + 8 bytes).
inKey material to wrap; length must be a multiple of 8.
inlenLength of in in bytes.