KCAPI_MD_SETKEY(3)
π NAME π
kcapi_md_setkey β bestie, this is the one that sets the key for your message digest handle π
β¨ SYNOPSIS β¨
int kcapi_md_setkey(struct kcapi_handle * handle, const uint8_t * key,
uint32_t keylen);
π ARGUMENTS π
handleβ [in] your cipher handle, the lil main character of this whole situation π«Άkeyβ [in] the key buffer, aka where your actual key liveskeylenβ [in] length of that key buffer, so we know how much of it to actually read π
πΈ DESCRIPTION πΈ
Okay so, with this function the caller sets the key for all the hashing operations that come after it. Lowkey important: this call is only applicable for keyed message digests β not your plain unkeyed ones, iykyk.
And here's the part that's genuinely iconic π β once you've handed the key over, you may securely destroy it, because at that point it's being maintained by the kernel, not by you. No cap. Your key is safe in the kernel's hands now, so go ahead and wipe your copy, bestie π
The return value is giving:
0upon success π- a negative errno-style error code if an error occurred π
π¦ AUTHOR π¦
Stephan Mueller <smueller@chronox.de> Author.
π COPYRIGHT π
That's a wrap, gorgeous! This was libkcapi Manual version 1.5.0, dated July 2025 β go set some keys, destroy them securely, and slay the whole time πβ¨π
π¦ 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