crypto_free_ahash(9)
π crypto_free_ahash(9) β Kernel API Manual π
okok so welcome to the kernel API manual page for crypto_free_ahash, bestie β¨ this one lives in section 9, it's a Kernel API Manual thing, and it's honestly short and sweet β the cleanup queen of the ahash world π
πΈ NAME πΈ
crypto_free_ahash β zeroize and free the ahash handle π
like, it wipes the secrets and then yeets the handle. two jobs, does both π
β¨ SYNOPSIS β¨
void crypto_free_ahash (struct crypto_ahash *tfm );
that's it. that's the whole signature. no weird extra args, no drama, we love a clean prototype π«Ά
π¦ ARGUMENTS π¦
tfmβ the cipher handle that's getting freed π she's done her service, let her rest
π DESCRIPTION π
so here's the tea: if tfm is a NULL pointer or an error pointer, this function does nothing. literally nothing. just vibes and returns π§ no crash, no boom, no "not me dereferencing a bad pointer" moment. it's giving safe-to-call, iykyk π
otherwise? it zeroizes and frees the ahash handle. zeroize first, then free β because leaving key material lying around in freed memory is not the move, no cap π₯
lowkey a great reminder that cleanup paths should always be this forgiving β checking for NULL and error pointers before doing anything is iconic defensive-programming behavior and you should absolutely steal it π
π SEE ALSO π
the whole extended friend group, in order, no one left out π
- Kernel file
./include/crypto/hash.h - Message Digest Algorithm Definitions(9)
struct ahash_alg(9)struct shash_alg(9)- Asynchronous Message Digest API(9)
crypto_alloc_ahash(9)crypto_has_ahash(9)crypto_ahash_blocksize(9)crypto_ahash_digestsize(9)crypto_ahash_statesize(9)crypto_ahash_reqtfm(9)crypto_ahash_reqsize(9)crypto_ahash_setkey(9)crypto_ahash_finup(9)crypto_ahash_final(9)crypto_ahash_digest(9)crypto_ahash_export(9)crypto_ahash_import(9)crypto_ahash_init(9)crypto_ahash_update(9)- Asynchronous Hash Request Handle(9)
ahash_request_set_tfm(9)ahash_request_alloc(9)ahash_request_free(9)ahash_request_set_callback(9)ahash_request_set_crypt(9)ahash_request_set_virt(9)- Synchronous Message Digest API(9)
crypto_alloc_shash(9)crypto_free_shash(9)crypto_shash_blocksize(9)crypto_shash_digestsize(9)crypto_shash_descsize(9)crypto_shash_setkey(9)crypto_shash_digest(9)crypto_shash_tfm_digest(9)crypto_shash_export(9)crypto_shash_import(9)crypto_shash_init(9)crypto_shash_finup(9)crypto_shash_update(9)crypto_shash_final(9)
and that's the whole page, bestie, you ate that π this little beauty ships out of ./include/crypto, dated October 2026, and it answers to the name crypto_free_ahash(9) β mwah π go free some handles responsibly π
β¨
π¦ 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