DOKK / manpages / debian 11 / libkcapi-dev / kcapi_aead_setkey.3.en
KCAPI_AEAD_SETKEY(3) Programming Interface KCAPI_AEAD_SETKEY(3)

kcapi_aead_setkey - set the key for the AEAD handle

int kcapi_aead_setkey(struct kcapi_handle * handle, const uint8_t * key, uint32_t keylen);

handle

[in] cipher handle

key

[in] key buffer

keylen

[in] length of key buffer

With this function, the caller sets the key for subsequent encryption or decryption operations.

After the caller provided the key, the caller may securely destroy the key as it is now maintained by the kernel.

return 0 upon success; a negative errno-style error code if an error occurred

Stephan Mueller <smueller@chronox.de>

Author.

November 2020 libkcapi Manual 1.2.1