hmac_sha384_usingrawkey(9)
π hmac_sha384_usingrawkey(9) β Kernel API Manual, bestie edition
okay so first things first, this is a page from the Kernel API Manual, and the star of the show is hmac_sha384_usingrawkey(9). She does exactly one thing and she does it flawlessly. Let's get into it π
β¨ NAME β¨
hmac_sha384_usingrawkey β compute HMAC-SHA384 in one shot, using a raw key. one shot!! no preamble, no warm-up, we're just doing it π
π¦ SYNOPSIS π¦
void hmac_sha384_usingrawkey (const u8 *raw_key , size_t raw_key_len ,
const u8 *data , size_t data_len , u8 out[static SHA384_DIGEST_SIZE] );
like, look at that signature. five params, zero drama. the out buffer is literally sized for you at SHA384_DIGEST_SIZE, the compiler has your back fr fr π«Ά
πΈ ARGUMENTS πΈ
raw_keyβ the raw HMAC-SHA384 key. raw as in unprepared, bestie, straight off the street π§raw_key_lenβ the key length in bytes. and listen: all key lengths are supported. every single one. no judgment, no minimum, no "sorry that's too short" energy. iconic πdataβ the message data. the actual tea being hashed βdata_lenβ the data length in bytes.outβ (output) the resulting HMAC-SHA384 value. she's the main character of this function, no cap π
π DESCRIPTION π
so here's the vibe check: this is the one-shot version. you hand her a raw key, she computes the HMAC-SHA384, done, bye β¨
but listen closely, bestie, because this is the important part π
If you're using the key multiple times, prefer to usehmac_sha384_preparekeyfollowed by multiple calls tohmac_sha384instead.
like yeah this one works, but if that key is gonna be reused, do the prepare-once-then-call-many thing. it's giving efficiency, it's giving respect for your CPU, it's giving "I read the whole manpage" ππ₯
π CONTEXT π
Any context. literally any. she's flexible like that. no asterisks, no caveats, go off wherever you are π¦
β SEE ALSO β
okay this list is long and she ate, every single one of these is here:
- Kernel file
./include/crypto/sha2.h struct sha224_ctx(9)sha224_init(9)sha224_update(9)sha224_final(9)sha224(9)struct hmac_sha224_key(9)struct hmac_sha224_ctx(9)hmac_sha224_preparekey(9)hmac_sha224_init(9)hmac_sha224_init_usingrawkey(9)hmac_sha224_update(9)hmac_sha224_final(9)hmac_sha224(9)hmac_sha224_usingrawkey(9)struct sha256_ctx(9)sha256_init(9)sha256_update(9)sha256_final(9)sha256(9)sha256_finup_2x(9)sha256_finup_2x_is_optimized(9)struct hmac_sha256_key(9)struct hmac_sha256_ctx(9)hmac_sha256_preparekey(9)hmac_sha256_init(9)hmac_sha256_init_usingrawkey(9)hmac_sha256_update(9)hmac_sha256_final(9)hmac_sha256(9)hmac_sha256_usingrawkey(9)struct sha384_ctx(9)sha384_init(9)sha384_update(9)sha384_final(9)sha384(9)struct hmac_sha384_key(9)struct hmac_sha384_ctx(9)hmac_sha384_preparekey(9)hmac_sha384_init(9)hmac_sha384_init_usingrawkey(9)hmac_sha384_update(9)hmac_sha384_final(9)hmac_sha384(9)struct sha512_ctx(9)sha512_init(9)sha512_update(9)sha512_final(9)sha512(9)struct hmac_sha512_key(9)struct hmac_sha512_ctx(9)hmac_sha512_preparekey(9)hmac_sha512_init(9)hmac_sha512_init_usingrawkey(9)hmac_sha512_update(9)hmac_sha512_final(9)hmac_sha512(9)hmac_sha512_usingrawkey(9)
that's the whole family reunion right there, all 57 of them, and yes I counted ππ
and that's the page!! this lil gem lives over in ./include/crypto, shipped with the October 2026 version of the kernel docs. go hash something, bestie, you're gonna slay it πβ¨ππ«Ά
π¦ 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