getrandom()
fills
buf
with up to
buflen
bytes of random data.
The
flags
argument may include zero or more of the following:
‘GRND_NONBLOCK’
|
Return
EAGAIN
instead of blocking, if the
random(4)
device has not yet been seeded.
By default,
getrandom()
will block until the device is seeded.
|
‘GRND_RANDOM’
|
This flag does nothing on
FreeBSD .
/dev/random
and
/dev/urandom
are identical.
|
If the
random(4)
device has been seeded, reads of up to 256 bytes will always return as many
bytes as requested and will not be interrupted by signals.