hmac_sha1(9)
π hmac_sha1 β the Kernel API Manual edition π
okay so bestie, welcome to hmac_sha1(9) β yes that's the page name, yes it's from the Kernel API Manual, and yes we're gonna get through this together β¨
πΈ NAME πΈ
hmac_sha1 β compute HMAC-SHA1 in one shot, using a prepared key. literally one call, no drama, we love a one-shot queen π
β¨ SYNOPSIS β¨
void hmac_sha1 (const struct hmac_sha1_key *key , const u8 *data ,
size_t data_len , u8 out[static SHA1_DIGEST_SIZE] );
that's it. that's the whole vibe check π«Ά
π¦ ARGUMENTS π¦
keyβ the prepared HMAC key π like, it's already been prepped, don't come at it raw (iykyk β see DESCRIPTION)dataβ the message data π the actual content you're HMAC-ing, the main characterdata_lenβ the data length in bytes π gotta know how much data you're feeding in, no capoutβ (output) the resulting HMAC-SHA1 value π this is where the magic lands, it's the output param, it writes into here
π DESCRIPTION π
so here's the tea: if you're using the key only once, consider using hmac_sha1_usingrawkey instead π
that's the whole description. short and iconic. periodt.
π₯ CONTEXT π₯
Any context. β¨ literally any. she's flexible, she doesn't gatekeep πΈ
π SEE ALSO π
go read these next, bestie, they're all in the kernel file ./include/crypto/sha1.h π:
struct sha1_ctx(9)sha1_init(9)sha1_update(9)sha1_final(9)sha1(9)struct hmac_sha1_key(9)struct hmac_sha1_ctx(9)hmac_sha1_preparekey(9)hmac_sha1_init(9)hmac_sha1_init_usingrawkey(9)hmac_sha1_update(9)hmac_sha1_final(9)hmac_sha1_usingrawkey(9)
π reminder bestie: if that key is a one-time thing, hmac_sha1_usingrawkey is right there. don't make it complicated π
and that's the page!! source is ./include/crypto, dated October 2026 β mwah, you ate this, go forth and HMAC responsibly ππ§ββοΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms