| Copyright | Soostone Inc, Snap Framework Authors |
|---|---|
| License | BSD3 |
| Maintainer | Ozgun Ataman <ozgun.ataman@soostone.com> |
| Stability | experimental |
| Safe Haskell | None |
| Language | Haskell98 |
Data.RNG
Contents
Description
Convenience thread-safe wrapper around mwc-random library for practical supply of random numbers in a concurrent environment.
Documentation
Create a new RNG in the IO monad using withSystemRandom.
withRNG :: RNG -> (GenIO -> IO a) -> IO a Source
Perform given action, mutating the RNG state underneath.
randomToken :: Int -> RNG -> IO ByteString Source
Generates a random salt of given length
Re-export MWC for convenience.
module System.Random.MWC