Produces an unpredictable four-byte value.
See: randombytes_random()
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
Modulelibsodium-bindings-0.0.1.1Haskell2010
A collection of functions for securely generating unpredictable data. This uses the best option on each platform, as follows:
On Windows, RtlGenRandom.
On FreeBSD and Linux, getrandom syscall.
On other UNIX platforms, /dev/urandom.
Produces an unpredictable four-byte value.
See: randombytes_random()
Produces an unpredictable four-byte value not larger than the argument. This function guarantees a uniform distribution on results, even if the upper limit is not a power of 2.
randombytesBuf Fills a buffer of the given size with unpredictable bytes.
See: randombytes_buf()