hmac_sha1_usingrawkey(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… hmac_sha1_usingrawkey β€” the kernel API manual, bestie edition ✨

okay so this is hmac_sha1_usingrawkey from the Kernel API Manual, and she is literally the one-shot queen πŸ‘‘ β€” you hand her a raw key, a message, and she hands you back an HMAC-SHA1 and dips. no cap.


🌸 NAME 🌸

hmac_sha1_usingrawkey β€” compute HMAC-SHA1 in one shot, using a raw key πŸŽ€


✨ SYNOPSIS ✨

void hmac_sha1_usingrawkey (const u8 *raw_key , size_t raw_key_len ,
       const u8 *data , size_t data_len , u8 out[static SHA1_DIGEST_SIZE] );

like. that's the whole vibe. five args, one call, done 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • raw_key β€” the raw HMAC-SHA1 key, bestie. that's the secret sauce πŸ’œ
  • raw_key_len β€” the key length in bytes. and listen β€” all key lengths are supported ✨ no gatekeeping, we love to see it.
  • data β€” the message data πŸ“
  • data_len β€” the data length in bytes, fr fr
  • out β€” (output) the resulting HMAC-SHA1 value πŸ’– this is where the magic lands, main character energy only

🌈 DESCRIPTION 🌈

so here's the tea β˜• β€” if you're using the key multiple times, pleaseeee prefer hmac_sha1_preparekey followed by multiple calls to hmac_sha1 instead. it's giving efficiency, it's giving respect for your CPU's time πŸ’…

like don't be out here re-doing the key work every single call, that's not the move 😭

🧚 CONTEXT 🧚

Any context. literally any. she doesn't care where you are, she'll slay anyway ⭐


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/crypto/sha1.h β€” plus the whole friend group, all of them, in order:


πŸŽ€ and that's the wrap πŸŽ€

this iconic little page lives over in ./include/crypto, version dated October 2026 β€” bestie, she's from the future and she still ate πŸ’€πŸ’– bye, go hash something responsibly! πŸ¦‹

πŸ“¦ where this page comes from