Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:prandom_bytes_state - get the requested number of pseudo-random bytes*@state: pointer to state structure holding seeded state.*@buf: where to copy the pseudo-random bytes to*@bytes: the requested number of bytes

Proto:void prandom_bytes_state(struct rnd_state *state, void *buf, size_t bytes)

Type:void

Parameter:

TypeParameterName
struct rnd_state *state
void *buf
size_tbytes
103  ptr = buf
105  When bytes >= sizeof(u32) cycle
106  put value to a possibly mis-aligned location(prandom_u32_state(state), (u32 * )ptr)
107  ptr += sizeof(u32)
108  bytes -= sizeof(u32)
111  If bytes > 0 Then
112  rem = prandom_u32_state(state)
113  Do
114  ptr++ = rem
115  bytes--
116  rem >>= BITS_PER_BYTE
117  When bytes > 0 cycle
Caller
NameDescribe
prandom_bytesprandom_bytes - get the requested number of pseudo-random bytes*@buf: where to copy the pseudo-random bytes to*@bytes: the requested number of bytes