Interface to the random number generator of the operating system.
It is possible that when used during early boot the first call to
will block until the system's RNG is initialised. It is also possible
(though highly unlikely) for
OsRng to fail on some platforms, most
likely due to system mis-configuration.
After the first successful call, it is highly unlikely that failures or significant delays will occur (although performance should be expected to be much slower than a user-space PRNG).
A random number generator that retrieves randomness from from the operating system.