KCAPI_RNG_GET_BYTES(3)
KCAPI_RNG_GET_BYTES πβ¨
okay bestie, welcome to section 3 of the Programming Interface manual, and today's main character is kcapi_rng_get_bytes β yes, the one and only convenience function to generate random bytes. she's short, she's sweet, she's giving β¨ effortless β¨. let's get into it π
β¨ SYNOPSIS β¨
ssize_t kcapi_rng_get_bytes(uint8_t * buffer, size_t outlen);
like. two arguments. that's it. no cap, she's lowkey minimal π
πΈ ARGUMENTS πΈ
bufferβ [out] this one gets filled with the random number. she's the output girlie, she receives π«Άoutlenβ [in] the buffer length. you're telling her how much room she's got to work with π
π¦ DESCRIPTION π¦
so basically? this convenience function generates random bytes of the size of outlen and stores them into the provided buffer. that's the whole vibe. she generates, she stores, she serves π§
β and the return value? on success you get the size of the random number generated. but if it goes sideways you get -EIO, which means the data cannot be obtained π not me crying over an I/O error fr fr.
π AUTHOR π
Stephan Mueller <smueller@chronox.de>
- Author.
iconic behavior honestly, we stan π
and that's the whole page bestie!! this was the libkcapi Manual, version 1.5.0, dated July 2025 β written with love, randomness, and zero boring manpage energy ππ periodt β¨π¦
π¦ where this page comes from
- fedora 43: libkcapi-devel 1.5.0-6.fc43 Β· BSD-3-Clause OR GPL-2.0-only
- fedora 43: libkcapi-devel 1.5.0-6.fc43 Β· BSD-3-Clause OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms