This is an interface to an OS-provided RNG that is fast and nevertheless secure enough for creating session keys. Note that it should not be used for creating long-term keys.
On Unix, the
/dev/urandom device is used. If it is not available, the
On Win32, an RNG is obtained using
Sets the globally used RNG
Fills this string with random bytes