Copyright | (c) Lars Kuhtz <lakuhtz@gmail.com> 2017 |
---|---|
License | MIT |
Maintainer | lakuhtz@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- random :: Natural -> IO ByteString
- randomGen :: GenIO -> Natural -> IO ByteString
Documentation
:: Natural | Length of the result bytestring in bytes |
-> IO ByteString |
Generate a random bytestring of length n. The PRNG is seeded from the system randomness source.
ioProperty $ ((fromIntegral n ===) . B.length) <$> random n
n > 4 ==> ioProperty $ (/=) <$> random n <*> random n