hmac_sha256_..._usingrawkey(9)
π
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:
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_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)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 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
- 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