KCAPI_RNG_GENERATE(3)

✨ NAME ✨

okay so bestie, welcome to kcapi_rng_generate(3) πŸ’– β€” this is the programming interface page for a function that does exactly one iconic thing: it generates a random number. that's it. that's the whole job. main character energy, zero drama. πŸŽ€


🌸 SYNOPSIS 🌸

ssize_t kcapi_rng_generate(struct kcapi_handle * handle,
                           uint8_t * buffer, size_t len);

like… look at her. three little params and a ssize_t return. she's not complicated, she's just ✨efficient✨. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • handle β€” [in] this is your cipher handle, aka the lil VIP pass you already got from the library. hand it over, no questions asked. 🫢
  • buffer β€” [out] this is the empty cup you're handing her, and she fills it with the random number. you provide the space, she brings the chaos (the good kind). πŸ“
  • len β€” [in] how big is that buffer? tell her, because she's not out here guessing. it's literally the buffer length. πŸ“

πŸ’œ DESCRIPTION πŸ’œ

so like, on success? she returns the size of the random number generated. that's the good ending, bestie. 🌈

but if things go sideways β€” if the data cannot be obtained β€” you get back -EIO. that's the error code, and it's giving "no thoughts, just failure" 😭. not a vibe, but at least she tells you fr fr.


πŸ‘‘ AUTHOR πŸ‘‘

  • Stephan Mueller <smueller@chronox.de> β€” Author.

yeah, the author. the person who actually wrote this. we love and respect them. πŸ«‘πŸ’–


libkcapi Manual 1.5.0 Β· July 2025 Β· KCAPI_RNG_GENERATE(3)


and that's the whole page, bestie ✨ random numbers generated, flags memorised, vibes immaculate. go forth and kcapi_rng_generate responsibly πŸ§šπŸ’œ periodt.

πŸ“¦ where this page comes from