lol-0.4.0.0: A library for lattice cryptography.

Safe HaskellNone
LanguageHaskell2010

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.

Synopsis

Documentation

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.