hmac_sha384(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… hmac_sha384(9) β€” the kernel API manual, bestie edition πŸŽ€

okay so picture this: you're deep in the kernel (section 9, ofc, that's the Kernel API Manual, iykyk), and you need your HMAC-SHA384 in one shot using a key you've already prepped. that's the whole vibe of hmac_sha384. one call, done, slay. ✨


🌸 NAME 🌸

hmac_sha384 β€” compute HMAC-SHA384 in one shot, using a prepared key. literally that's it, that's the function. 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

void hmac_sha384 (const struct hmac_sha384_key *key , const u8 *data ,
size_t data_len , u8 out[static SHA384_DIGEST_SIZE] );

no cap, that's the whole signature. keep it exact, she's sensitive about her types. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • key β€” the prepared HMAC key. key word being prepared, bestie β€” you already did the hmac_sha384_preparekey thing. don't come in here with raw key energy and expect it to hit. πŸ™ˆ
  • data β€” the message data. the actual stuff you're hashing. the main character of this whole operation. πŸ‘‘
  • data_len β€” the data length in bytes. yes queen, we count in bytes here, that's just how it is. πŸ“
  • out β€” (output) the resulting HMAC-SHA384 value. she receives the glow-up and holds it. out is static-sized at SHA384_DIGEST_SIZE, so the buffer situation is already handled for you. πŸ’–

✨ DESCRIPTION ✨

okay so real talk: if you're using the key only once, consider using hmac_sha384_usingrawkey instead. it's giving "why prep a key you're never gonna use again" energy. lowkey a good tip. 🌟


🌈 CONTEXT 🌈

Any context. literally any. no restrictions, no locks, no "sorry you can't call me from here". she's flexible like that. πŸ’œ


πŸ”₯ SEE ALSO πŸ”₯

the friend group, the whole extended universe, the group chat if you will. every single one of these, no skipping, that's the roster: 🫢

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_usingrawkey(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).

like I said. the whole friend group. ate. πŸ’€


and that's the page, bestie 🧚 β€” brought to you by the fine folks over at ./include/crypto, dated October 2026. go forth and HMAC responsibly. πŸ“πŸ’œ

πŸ“¦ where this page comes from