Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\verity\hash_algs.c Create Date:2022-07-28 20:24:39
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:sverity_hash_buffer() - hash some data*@alg: the hash algorithm to use*@data: the data to hash*@size: size of data to hash, in bytes*@out: output digest, size 'alg->digest_size' bytes* Hash some data which is located in physically contiguous memory (i

Proto:int fsverity_hash_buffer(const struct fsverity_hash_alg *alg, const void *data, size_t size, u8 *out)

Type:int

Parameter:

TypeParameterName
const struct fsverity_hash_alg *alg
const void *data
size_tsize
u8 *out
240  req = ahash_request_alloc() - allocate request data structure*@tfm: cipher handle to be registered with the request*@gfp: memory allocation flag that is handed to kmalloc by the API call.* Allocate the request data structure that must be used with the ahash
241  If Not req Then Return -ENOMEM
244  sg_init_one - Initialize a single entry sg list*@sg: SG entry*@buf: Virtual address for IO*@buflen: IO length
245  ahash_request_set_callback(req, CRYPTO_TFM_REQ_MAY_SLEEP | CRYPTO_TFM_REQ_MAY_BACKLOG, Async ops completion helper functioons, & wait)
248  ahash_request_set_crypt() - set data buffers*@req: ahash_request handle to be updated*@src: source scatter/gather list*@result: buffer that is filled with the message digest -- the caller must* ensure that the buffer has sufficient space by, for example,
250  err = crypto_wait_req(rypto_ahash_digest() - calculate message digest for a buffer*@req: reference to the ahash_request handle that holds all information* needed to perform the cipher operation* This function is a "short-hand" for the function calls of crypto_ahash_init,, & wait)
252  ahash_request_free() - zeroize and free the request data structure*@req: request data structure cipher handle to be freed
253  Return err
Caller
NameDescribe
compute_file_measurementCompute the file measurement by hashing the fsverity_descriptor excluding the* signature and with the sig_size field set to 0.