crypto_alloc_shash(9)
π crypto_alloc_shash(9) β Kernel API Manual π
okay so bestie, welcome to the Kernel API Manual page for crypto_alloc_shash(9) β it's the moment you finally get your hands on a message digest handle and honestly? iconic. π
πΈ NAME πΈ
crypto_alloc_shash β allocate message digest handle
β¨ SYNOPSIS β¨
struct crypto_shash * crypto_alloc_shash (const char *alg_name , u32
type , u32 mask );
Like, that's the whole vibe: you hand it a name, a type and a mask, and it hands you back a pointer to a struct crypto_shash. π«Ά
π ARGUMENTS π
alg_nameβ this is thecra_name/ name or thecra_driver_name/ driver name of the message digest cipher. so like, whichever of those two naming schemes you're feeling, it works π«typeβ specifies the type of the cipher πmaskβ specifies the mask for the cipher π¦
π DESCRIPTION π
Allocate a cipher handle for a message digest. The returned struct crypto_shash is the cipher handle that is required for any subsequent API invocation for that message digest. no cap β that handle is your main character, you literally cannot do the follow-up calls without it. π₯
β RETURN β
- allocated cipher handle in case of success β¨
IS_ERRis true in case of an error, andPTR_ERRreturns the error code π
so yeah, vibe check your pointer before you go wild with it, bestie. π
π SEE ALSO π
feel free to go down this absolute rabbit hole, iykyk π:
- 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_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_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 π§π this gem lives in ./include/crypto, it's dated October 2026, and yes it's still titled crypto_alloc_shash(9). go forth and digest, periodt. π
π
π¦ 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