Safe Haskell | Safe-Infered |
---|
Utilities related to randomized computations.
- generateSecret :: RandomGen g => Int -> g -> (String, g)
- generateOneMAC :: RandomGen g => String -> g -> (String, g)
- delayRandom :: (Int, Int) -> IO ()
Documentation
generateSecret :: RandomGen g => Int -> g -> (String, g)Source
Generates a random secret of a given length. The type is chosen so that it can be easily wrapped into a state monad.
generateOneMAC :: RandomGen g => String -> g -> (String, g)Source
Given a prefix, randomly generates a full MAC address.
See generateMAC
for discussion about how this function uses
the random generator.
delayRandom :: (Int, Int) -> IO ()Source
Wait a time period randomly chosen within the given bounds (in microseconds).