crypto_ahash_statesize(9)
π crypto_ahash_statesize β the Kernel API Manual page, bestie edition β¨
Okay so this is crypto_ahash_statesize(9) from the Kernel API Manual, and it's literally the glow-up you need when you're doing ahash state things. Let's get into it π«Ά
πΈ NAME πΈ
crypto_ahash_statesize β bestie, this is how you obtain the size of the ahash state. That's it, that's the whole vibe.
β¨ SYNOPSIS β¨
unsigned int crypto_ahash_statesize (struct crypto_ahash *tfm );
π ARGUMENTS π
tfmβ the cipher handle. Your little main character pointer π
π DESCRIPTION π
So like, this function returns the size of the ahash state. Periodt.
Why do you care? Because with the crypto_ahash_export function, the caller can export the state into a buffer β and the size of that buffer is defined with this function. So you gotta call crypto_ahash_statesize first to know how much room to give it, no cap. It's giving "measure twice, export once" π¦
β RETURN β
Size of the ahash state. That's the whole return value, and honestly? Iconic.
π SEE ALSO π
Okay this list is long but we do NOT skip parts, so buckle up bestie π
- 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_free_ahash(9)crypto_has_ahash(9)crypto_ahash_blocksize(9)crypto_ahash_digestsize(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)
That's the whole page, bestie β go forth and size those states π
Sign-off szn π: this lil beauty lives at ./include/crypto, dated October 2026, and it's filed under crypto_ahash_statesize(9) β iykyk β¨
π¦ 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