hmac_sha1_usingrawkey(9)
π 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 froutβ (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:
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(9)
π 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
- 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