Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\integrity\ima\ima_crypto.c Create Date:2022-07-28 19:58:32
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:calc_buffer_shash_tfm

Proto:static int calc_buffer_shash_tfm(const void *buf, loff_t size, struct ima_digest_data *hash, struct crypto_shash *tfm)

Type:int

Parameter:

TypeParameterName
const void *buf
loff_tsize
struct ima_digest_data *hash
struct crypto_shash *tfm
592  SHASH_DESC_ON_STACK(shash, tfm)
596  tfm = tfm
598  length = rypto_shash_digestsize() - obtain message digest size*@tfm: cipher handle* The size for the message digest created by the message digest cipher* referenced with the cipher handle is returned.* Return: digest size of cipher
600  rc = rypto_shash_init() - (re)initialize message digest*@desc: operational state handle that is already filled* The call (re-)initializes the message digest referenced by the* operational state handle. Any potentially existing state created by
601  If rc != 0 Then Return rc
604  When size cycle
605  len = If size < PAGE_SIZE Then size Else PAGE_SIZE
606  rc = rypto_shash_update() - add data to message digest for processing*@desc: operational state handle that is already initialized*@data: input data to be added to the message digest*@len: length of the input data
607  If rc Then Break
609  buf += len
610  size -= len
613  If Not rc Then rc = rypto_shash_final() - calculate message digest*@desc: operational state handle that is already filled with data*@out: output buffer filled with the message digest* Finalize the message digest operation and create the message digest
615  Return rc
Caller
NameDescribe
calc_buffer_shash