|
NAMEgetentropy —
get entropy
LIBRARYStandard C Library (libc, -lc)SYNOPSIS#include <unistd.h>
int
DESCRIPTIONgetentropy () fills a buffer with high-quality random
data.
The maximum buflen permitted is 256 bytes. If it does not produce an error,
Similar to reading from /dev/urandom just
after boot, IMPLEMENTATION NOTESThegetentropy () function is implemented using
getrandom(2).
RETURN VALUESUpon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error.ERRORSgetentropy () will succeed unless:
SEE ALSOgetrandom(2), arc4random(3), random(4)STANDARDSgetentropy () is non-standard. It is present on
OpenBSD and Linux.
HISTORYThegetentropy () function appeared in
OpenBSD 5.6. The FreeBSD libc
compatibility shim first appeared in FreeBSD 12.0.
Visit the GSP FreeBSD Man Page Interface. |