KCAPI_RNG_INIT(3)
β¨ NAME β¨
kcapi_rng_init β bestie, this is the one that gets your cipher handle initialized, okurrr π
It's from the Programming Interface manual, section 3, and honestly? iconic behavior.
πΈ SYNOPSIS πΈ
int kcapi_rng_init(struct kcapi_handle ** handle,
const char * ciphername, uint32_t flags);
π ARGUMENTS π
handleβ [out] the cipher handle that gets filled up during the call. yes bestie, this one's the output, she's giving main character energy and she's coming back to you π«Άciphernameβ [in] the kernel crypto API cipher name, exactly as it's specified in/proc/crypto. not vibes-based, actual file, actual name, no cap π¦flagsβ [in] flags that specify the type of cipher handle. for RNG this one is literally unused, she's just here for the plot π
π DESCRIPTION π
Okay so, this function initializes a random number generator handle and β the important part β establishes the connection to the kernel π₯ That's the whole thing. That's the vibe check. RNG handle, connected, done.
On success, a pointer to a kcapi_handle object is returned in *handle. So like, you get your handle back through that pointer. π«
After that, you should callkcapi_rng_destroyto free the resources. Not me forgetting to clean up... don't be that girl.kcapi_rng_destroyafterwards, periodt. π
And here's the return situation, so you know exactly what you're getting:
- returns
0upon success β slay β¨ -ENOENTβ algorithm not available π-EOPNOTSUPPβ theAF_ALGfamily is not available π-EINVALβ theacceptsyscall failed-ENOMEMβ the cipher handle cannot be allocated π
π AUTHOR π
Stephan Mueller <smueller@chronox.de> β the author. king behavior fr fr π
π COPYRIGHT π
And that's the whole page, bestie π just so you know where you are: this is libkcapi Manual 1.5.0, from July 2025 β KCAPI_RNG_INIT(3) β go forth and initialize responsibly, ily πΈπ¦π
π¦ 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