KCAPI_CIPHER_SETKEY(3) | Programming Interface | KCAPI_CIPHER_SETKEY(3) |
kcapi_cipher_setkey - set the key for the cipher handle
int kcapi_cipher_setkey(struct kcapi_handle * handle, const uint8_t * key, uint32_t keylen);
handle
key
keylen
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 (in case of an akcipher handle, a positive integer is returned that denominates the maximum output size of the cryptographic operation -- this value must be used as the size of the output buffer for one cryptographic operation); a negative errno-style error code if an error occurred
Stephan Mueller <smueller@chronox.de>
November 2020 | libkcapi Manual 1.2.1 |