sha256_final(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– sha256_final β€” the Kernel API Manual's own "wrap it up bestie" moment πŸ’–

okay so you're in the Kernel API Manual (yes, that one) and you've stumbled onto sha256_final(9), which is literally the last step of a SHA-256 digest. she's the finisher. the closer. the "ok we're done here" of the whole operation ✨


🌸 NAME 🌸

sha256_final β€” Finish computing a SHA-256 message digest

like bestie, the digest is done. she's cooked. serve her πŸ“


✨ SYNOPSIS ✨

void sha256_final (struct sha256_ctx *ctx , u8 out[static
SHA256_DIGEST_SIZE] );

yes the line break in the middle is real, she's just built like that, no cap πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • ctx β€” the context to finalize; must have been initialized. like, must. it's not optional, it's not a vibe, it's a requirement. this is the struct sha256_ctx you've been feeding this whole time 🫢
  • out β€” (output) the resulting SHA-256 message digest. she writes the answer here. this is the moment. main character energy fr πŸ”₯

πŸ¦‹ DESCRIPTION πŸ¦‹

So after finishing, this zeroizes ctx. read that again. she wipes the context clean on her way out 🧹✨

Which means β€” and this is the good part β€” the caller does not need to do it. no cleanup arc for you, bestie, that's her job. you can just chill. she ate and left no crumbs πŸ’€


🌈 CONTEXT 🌈

Any context. literally any. she's flexible like that πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

okay this list is long long, so buckle up buttercup, we're going on a tour of the whole sha2 header 🌸

Kernel file ./include/crypto/sha2.h πŸ’œ

SHA-224 crew:

HMAC-SHA-224 girlies:

SHA-256 squad (your faves):

HMAC-SHA-256 crew:

SHA-384 babes:

HMAC-SHA-384 hive:

SHA-512 icons:

HMAC-SHA-512 royalty:

every single one. not me listing all of them. iykyk πŸ˜­πŸ’–


quick vibe check: ctx must have been initialized before you call this. don't be the person who skips sha256_init. that's not a look πŸ™ˆ

⭐ okay that's the page!! brought to you by ./include/crypto, version dated October 2026, filed under sha256_final(9) β€” mwah, go hash something, bestie πŸ’…πŸŽ€πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from