函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\mpi\mpicoder.c Create Date:2022-07-27 08:17:18
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:int mpi_read_buffer(MPI a, uint8_t *buf, unsigned buf_len, unsigned *nbytes, int *sign)

返回类型:int

参数:

类型参数名称
MPIa
uint8_t *buf
unsignedbuf_len
unsigned *nbytes
int *sign
154  n等于需要存储的数量极大值
157  如果非buf或非nbytes则返回:负EINVAL
160  如果signsign等于 indicates a negative number
163  lzeros等于count_lzeros(a)
165  如果buf_len小于nlzeros
166  nbytes等于nlzeros
167  返回:负EOVERFLOW
170  p等于buf
171  nbytes等于nlzeros
173 i大于等于0循环
177  alimb等于cpu_to_be32( array with the limbs [i])
183  内存复制(p, (u8 * ) & alimb + lzeros, BYTES_PER_MPI_LIMB - lzeros)
184  p加等于BYTES_PER_MPI_LIMBlzeros
185  lzeros等于0
187  返回:0
调用者
名称描述
mpi_get_buffermpi_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.