Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\dh.c Create Date:2022-07-28 18:27:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:kdf_alloc

Proto:static int kdf_alloc(struct kdf_sdesc **sdesc_ret, char *hashname)

Type:int

Parameter:

TypeParameterName
struct kdf_sdesc **sdesc_ret
char *hashname
95  tfm = crypto_alloc_shash(hashname, 0, 0)
96  If IS_ERR(tfm) Then
97  pr_info("could not allocate digest TFM handle %s\n", hashname)
98  Return PTR_ERR(tfm)
101  err = -EINVAL
102  If 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 == 0 Then Go to out_free_tfm
105  err = -ENOMEM
106  size = sizeof(structshash_desc) + rypto_shash_descsize() - obtain the operational state size*@tfm: cipher handle* The size of the operational state the cipher needs during operation is* returned for the hash referenced with the cipher handle
107  sdesc = Allocation memory
108  If Not sdesc Then Go to out_free_tfm
110  tfm = tfm
112  sdesc_ret = sdesc
114  Return 0
116  out_free_tfm :
117  rypto_free_shash() - zeroize and free the message digest handle*@tfm: cipher handle to be freed
118  Return err
Caller
NameDescribe
__keyctl_dh_compute