The first of these was getentropy, introduced to the OpenBSD operating system in release 5.6 (November 2014), as a refactoring of the sysctl(3) KERN_ARND approach used since 1997.
[4] In August 2015, FreeBSD introduced the read_random system call for obtaining random data from the kernel.
Some of these, such as the C programming language's rand(), POSIX's random(), and drand48(), are very unsafe when used for cryptography or similar applications, because these algorithms are actually deterministic, having been intentionally crippled to satisfy seed-reuse requirements through the interfaces srand(), srandom(), and srand48().
A significant difference exists between these calls: getentropy() guarantees that random numbers will be returned immediately, without any blocking.
It requires operating support which guarantees random data stream initialization at the earliest opportunity.
For this purpose, OpenBSD's C standard library includes the function arc4random, which programs are expected to call when they need random data.