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