函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\apparmor\crypto.c Create Date:2022-07-27 21:48:36
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:aa_calc_hash

函数原型:char *aa_calc_hash(void *data, size_t len)

返回类型:char

参数:

类型参数名称
void *data
size_tlen
30  SHASH_DESC_ON_STACK(desc, apparmor_tfm)
31  char * hash = NULL
32  error等于负ENOMEM
34  如果非apparmor_tfm则返回:NULL
37  hash等于分配内存并置零
38  如果非hash则转到:fail
41  tfm等于apparmor_tfm
43  error等于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
44  如果error则转到:fail
46  error等于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
47  如果error则转到:fail
49  error等于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
50  如果error则转到:fail
53  返回:hash
55  fail :
56  释放内存
58  返回:错误号