crypto_alloc_shash(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 the cra_name / name or the cra_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_ERR is true in case of an error, and PTR_ERR returns 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 πŸ’€:


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