crypto_shash_export(9)
π NAME π
okay bestie π this is crypto_shash_export(9) from the Kernel API Manual, and itβs literally here to extract operational state for message digest. slay.
β¨ SYNOPSIS β¨
int crypto_shash_export (struct shash_desc *desc , void *out );
πΈ ARGUMENTS πΈ
descβ reference to the operational state handle whose state is exported. like, the handle youβre grabbing the state from π«Άoutβ output buffer of sufficient size that can hold the hash state. no tiny-buffer energy, okay? π
π DESCRIPTION π
So this function exports the hash state of the operational state handle into the caller-allocated output buffer out, which must have sufficient size β e.g. by calling crypto_shash_descsize. Thatβs the whole vibe: grab the state, put it in out, make sure out is big enough π
bestie, the size part is not a suggestion.outmust have sufficient size, andcrypto_shash_descsizeis the example the page gives for getting it. periodt. π
π¦ CONTEXT π¦
Call it in Softirq or process context. thatβs it, thatβs the context. β¨
β RETURN β
0if the export creation was successful π< 0if an error occurred π
π SEE ALSO π
The whole squad, bestie β every single one is invited π«Ά:
- Kernel file
./include/crypto/hash.handMessage Digest Algorithm Definitions(9)π struct ahash_alg(9),struct shash_alg(9),Asynchronous Message Digest API(9)- async digest crew:
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)β¨ - async request besties:
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)π¦ - sync digest crew:
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_import(9),crypto_shash_init(9),crypto_shash_finup(9),crypto_shash_update(9),crypto_shash_final(9)π
Thatβs the whole page, bestie π«Ά source file ./include/crypto, dated October 2026, and the page is crypto_shash_export(9) β byeee π
β¨
π¦ 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