-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | RNG within an MVar for convenient concurrent use
--   
--   RNG within an MVar for convenient concurrent use
@package rng-utils
@version 0.2.1


-- | Convenience thread-safe wrapper around mwc-random library for
--   practical supply of random numbers in a concurrent environment.
module Data.RNG

-- | High speed, mutable random number generator state
data RNG

-- | Create a new RNG in the IO monad using <a>withSystemRandom</a>.
mkRNG :: IO RNG

-- | Create a new RNG with a user-specified seed.
seedRNG :: [Word32] -> IO RNG

-- | Pack your own rng into the <a>RNG</a> type.
packRNG :: GenIO -> IO RNG

-- | Perform given action, mutating the RNG state underneath.
withRNG :: RNG -> (GenIO -> IO a) -> IO a

-- | Generates a random salt of given length
randomToken :: Int -> RNG -> IO ByteString
