1KCAPI_MD_INIT(3) Programming Interface KCAPI_MD_INIT(3)
2
3
4
6 kcapi_md_init - initialize cipher handle
7
9 int kcapi_md_init(struct kcapi_handle ** handle,
10 const char * ciphername, uint32_t flags);
11
13 handle
14 [out] cipher handle filled during the call
15
16 ciphername
17 [in] kernel crypto API cipher name as specified in /proc/crypto
18
19 flags
20 [in] flags specifying the type of cipher handle
21
23 This function provides the initialization of a (keyed) message digest
24 handle and establishes the connection to the kernel.
25
26 On success, a pointer to kcapi_handle object is returned in *handle.
27 Function kcapi_md_destroy should be called afterwards to free
28 resources.
29
30 return 0 upon success; -ENOENT - algorithm not available; -EOPNOTSUPP -
31 AF_ALG family not available; -EINVAL - accept syscall failed; -ENOMEM -
32 cipher handle cannot be allocated
33
35 Stephan Mueller <smueller@chronox.de>
36 Author.
37
39libkcapi Manual 1.1.5 August 2019 KCAPI_MD_INIT(3)