crypto_ahash_setkey(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

okay so welcome to the Kernel API Manual, bestie πŸ’– β€” this page is all about crypto_ahash_setkey β€” and what it does is set key for cipher handle, periodt.


✨ SYNOPSIS ✨

int crypto_ahash_setkey (struct crypto_ahash *tfm , const u8 *key ,
unsigned int keylen );

🌸 ARGUMENTS 🌸

  • tfm β€” the cipher handle 🫢 like, the thing you're handing the key to.
  • key β€” a buffer holding the key πŸ”‘ that's literally where the key lives.
  • keylen β€” length of the key in bytes πŸ“ no cap, bytes.

πŸ¦‹ DESCRIPTION πŸ¦‹

so the caller-provided key gets set for the ahash cipher πŸ’… that's the whole vibe.

and here's the important part, iykyk: the cipher handle must point to a keyed hash in order for this function to succeed 😭 like, if it's not a keyed hash, bestie, it's not happening.


πŸ‘‘ RETURN πŸ‘‘

  • 0 β€” if the setting of the key was successful ✨ slay.
  • < 0 β€” if an error occurred πŸ’€ not slay.

🌈 SEE ALSO 🌈

the whole friend group, fr fr:


that's the whole page, bestie 🧚 source vibe: ./include/crypto, dated October 2026 β€” mwah, go set some keys πŸ’…πŸ’œ

πŸ“¦ where this page comes from