DOKK / manpages / debian 12 / libkcapi-dev / kcapi_rng_get_bytes.3.en
KCAPI_RNG_GET_BYTES(3) Programming Interface KCAPI_RNG_GET_BYTES(3)

kcapi_rng_get_bytes - Convenience function to generate random bytes

ssize_t kcapi_rng_get_bytes(uint8_t * buffer, size_t outlen);

buffer

[out] filled with the random number

outlen

[in] buffer length

This convenience function generates random bytes of the size of outlen and stores them into the provided buffer.

return size of random number generated upon success; -EIO - data cannot be obtained

Stephan Mueller <smueller@chronox.de>

Author.

February 2022 libkcapi Manual 1.4.0