Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\mpi\mpicoder.c Create Date:2022-07-28 07:18:44
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:mpi_get_buffer() - Returns an allocated buffer with the MPI (msb first).* Caller must free the return string.* This function does return a 0 byte buffer with nbytes set to zero if the* value of A is zero.*@a: a multi precision integer.

Proto:void *mpi_get_buffer(MPI a, unsigned *nbytes, int *sign)

Type:void

Parameter:

TypeParameterName
MPIa
unsigned *nbytes
int *sign
209  If Not nbytes Then Return NULL
212  n = mpi_get_size() - returns max size required to store the number*@a: A multi precision integer for which we want to allocate a bufer* Return: size required to store the number
214  If Not n Then n++
217  buf = kmalloc(n, GFP_KERNEL)
219  If Not buf Then Return NULL
222  ret = mpi_read_buffer() - read MPI to a bufer provided by user (msb first)*@a: a multi precision integer*@buf: bufer to which the output will be written to
224  If ret Then
225  kfree(buf)
226  Return NULL
228  Return buf
Caller
NameDescribe
digsig_verify_rsaRSA Signature verification with public key