1KCAPI_CIPHER_SETKEY(3) Programming Interface KCAPI_CIPHER_SETKEY(3)
2
3
4
6 kcapi_cipher_setkey - set the key for the cipher handle
7
9 int kcapi_cipher_setkey(struct kcapi_handle * handle,
10 const uint8_t * key, uint32_t keylen);
11
13 handle
14 [in] cipher handle
15
16 key
17 [in] key buffer
18
19 keylen
20 [in] length of key buffer
21
23 With this function, the caller sets the key for subsequent encryption
24 or decryption operations.
25
26 After the caller provided the key, the caller may securely destroy the
27 key as it is now maintained by the kernel.
28
29 return 0 upon success (in case of an akcipher handle, a positive
30 integer is returned that denominates the maximum output size of the
31 cryptographic operation -- this value must be used as the size of the
32 output buffer for one cryptographic operation); a negative errno-style
33 error code if an error occurred
34
36 Stephan Mueller <smueller@chronox.de>
37 Author.
38
40libkcapi Manual 1.1.5 August 2019 KCAPI_CIPHER_SETKEY(3)