hmac_sha256_..._usingrawkey(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… hmac_sha256_init_usingrawkey β€” the hmac_sha256_..._usingrawkey(9) glow-up

okay so bestie, this is a page straight out of the Kernel API Manual, and it's literally about setting up an HMAC-SHA256 context when all you've got is a raw key. no prepared-key era, no fancy precomputation β€” just you, your bytes, and the vibes. let's get into it πŸŽ€


✨ NAME ✨

hmac_sha256_init_usingrawkey β€” initialize an HMAC-SHA256 context for a new message, using a raw key πŸ¦‹


🌸 SYNOPSIS 🌸

void hmac_sha256_init_usingrawkey (struct hmac_sha256_ctx *ctx , const
u8 *raw_key , size_t raw_key_len );

that's the whole signature, no cap. void return, so it's giving "i do the thing and you deal with the results" energy. ✨


🫢 ARGUMENTS 🫢

  • ctx β€” (output) the HMAC context you're initializing. this is where the magic gets written, so hand over a real one, okay? πŸ’–
  • raw_key β€” the raw HMAC-SHA256 key, in its natural state. just the key. nothing done to it. 🧚
  • raw_key_len β€” the key length in bytes. and listen β€” all key lengths are supported. every single one. nobody's getting turned away at the door. πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

the actual description is short and sweet, so here it is in full: if you don't need incremental computation, consider hmac_sha256_usingrawkey instead. that's it, that's the note. lowkey iconic how it just says the one thing and dips πŸ™ˆ

fr fr though β€” that's a "consider", not a "you must". if you do need to feed the message in pieces, stay right here. the incremental life chose you.

πŸ”₯ CONTEXT πŸ”₯

Any context. literally any. run it from wherever, whenever. no restrictions, no dress code πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

okay this list is long long, so buckle up bestie β€” the whole sha2 and hmac family reunion is here 🌈

Kernel file ./include/crypto/sha2.h, plus:

like i said. the whole family. 224, 256, 384, 512, all of them showed up to the party and they all ate πŸ’€βœ¨


and that's the page! source path is ./include/crypto and the version date on this beauty is October 2026 β€” so yeah, she's from the future, she's flawless, and she's out. mwah πŸ’‹πŸ’–πŸŽ€

πŸ“¦ where this page comes from