| Copyright | (c) Eric Crockett 2011-2017 Chris Peikert 2011-2017 |
|---|---|
| License | GPL-2 |
| Maintainer | ecrockett0@email.com |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | Haskell2010 |
Crypto.Lol.Types.Random
Description
Defines a newtype wrapper CryptoRand for crypto-api's
CryptoRandomGen, and a corresponding RandomGen wrapper
instance. These are needed because CryptoRandomGen generators
can only be used to get Data.ByteStrings; the RandomGen wrapper
instance allows them to be used to generate any Random type.
- data CryptoRand g
- evalCryptoRandIO :: (CryptoRandomGen g, MonadIO io) => RandT g io a -> io a
Documentation
data CryptoRand g Source #
Turns a CryptoRandomGen g into a standard RandomGen.
Instances
| CryptoRandomGen g => RandomGen (CryptoRand g) Source # | |
| CryptoRandomGen g => CryptoRandomGen (CryptoRand g) Source # | |
evalCryptoRandIO :: (CryptoRandomGen g, MonadIO io) => RandT g io a -> io a Source #
Evaluate a RandT computation using a cryptographic generator
g, seeded by system entropy. Note that the updated generator is
not returned.