ahash_request_alloc(9)
β¨ ahash_request_alloc π
okay so bestie, welcome to the kernel crypto corner of the manual pages β this one is ahash_request_alloc(9) from the Kernel API Manual and it's literally the lil' allocator that sets your async hash life up π
πΈ NAME πΈ
ahash_request_alloc β allocate request data structure
yep that's it, that's the whole gig: it makes you a request data structure π«Ά
β¨ SYNOPSIS β¨
struct ahash_request * ahash_request_alloc (struct crypto_ahash *tfm ,
gfp_t gfp );
look at her go π returns a struct ahash_request * and takes two args, iconic
π¦ ARGUMENTS π¦
tfmβ the cipher handle that gets registered with the request. she's the main character of this whole operation πgfpβ the memory allocation flag, and it gets handed straight tokmallocby the API call. so like, that's the vibe you're passing down to the allocator, no cap π
π DESCRIPTION π
okay so here's the tea: this function allocates the request data structure that must be used with the ahash message digest API calls. like, not optional, you need this one fr fr.
and during the allocation, the ahash handle you passed in (tfm) gets registered in the request data structure. so your handle is literally baked in from the start, slay β¨
bestie note: the original says "must be used" β so yeah, this isn't a cute suggestion, it's the requirement π
β RETURN β
it gives you back the allocated request handle in case of success β or NULL if it's out of memory π (that's the sad path, no cap)
π₯ SEE ALSO π₯
so many friends, she's got the whole group chat linked up:
- Kernel file
./include/crypto/hash.hMessage 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_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_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, go forth and allocate responsibly π
mwah π β this lil' beauty lives in ./include/crypto, stamped October 2026, and it's brought to you by the ahash_request_alloc(9) girlies of the Kernel API Manual πβ¨
π¦ 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