crypto_shash_tfm_digest(9)
π crypto_shash_tfm_digest(9) π
okay so bestie, welcome to the Kernel API Manual β this one's a little crypto baddie and she's honestly so convenient π
β¨ NAME β¨
crypto_shash_tfm_digest β calculate message digest for buffer π
πΈ SYNOPSIS πΈ
int crypto_shash_tfm_digest(struct crypto_shash *tfm, const u8 *data,
unsigned int len, u8 *out);
π¦ ARGUMENTS π¦
tfmβ the hash transformation object, aka the main character of this whole operation πdataβ seecrypto_shash_updatelenβ seecrypto_shash_updateoutβ seecrypto_shash_final
π DESCRIPTION π
So this is the simplified version of crypto_shash_digest for users who do not want to allocate their own hash descriptor (shash_desc). Like, why would you when she'll do it for you? π
Instead, crypto_shash_tfm_digest takes a hash transformation object (crypto_shash) directly, and it allocates a hash descriptor on the stack internally. Slay, right? β¨
but ngl bestie β note that this stack allocation may be fairly large π so keep that in mind, fr fr.
π CONTEXT π
Softirq or process context. That's it, that's the vibe π«Ά
β RETURN β
0 on success; < 0 if an error occurred. Simple as that, no cap π
π SEE ALSO π
- 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_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_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 digest πβ¨
source: ./include/crypto Β· version/date: October 2026 Β· crypto_shash_tfm_digest(9) β mwah, luv u, bye π«Άπ
π¦ 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