1KCAPI_RNG_INIT(3) Programming Interface KCAPI_RNG_INIT(3)
2
3
4
6 kcapi_rng_init - initialize cipher handle
7
9 int kcapi_rng_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 (unused for RNG)
21
23 This function provides the initialization of a random number generator
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_rng_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.2.0 August 2020 KCAPI_RNG_INIT(3)