getrandom
getrandom is a Linux system call that provides user-space programs with random bytes drawn from the kernel’s entropy pool. It offers a direct interface to the kernel’s cryptographic random number generator without requiring access to device files such as /dev/random or /dev/urandom.
The function is exposed as int getrandom(void *buf, size_t buflen, unsigned int flags). It attempts to copy
Two flags may be combined with the call: GRND_NONBLOCK and GRND_RANDOM. GRND_NONBLOCK requests non-blocking behavior; if
getrandom is Linux-specific and is not guaranteed to be portable to other operating systems. In Linux environments,
The call relies on the kernel’s entropy sources, which are designed to be cryptographically secure. getrandom