gini-crypto-0.1.0.0

Safe HaskellNone
LanguageHaskell2010

Gini.Crypto.Random

Contents

Synopsis

runRandom

runRandomIO :: HasCryptoConfig env => MonadPseudoRandom ChaChaDRG a -> RIO env a #

Run a pure computation with the "global" deterministic random generator.

runRandomSTM :: HasCryptoConfig env => MonadPseudoRandom ChaChaDRG a -> ReaderT env STM a #

Run a pure computation with the "global" deterministic random generator.

Re-exports from Random

class (Functor m, Monad m) => MonadRandom (m :: * -> *) where #

Minimal complete definition

getRandomBytes

Methods

getRandomBytes :: ByteArray byteArray => Int -> m byteArray #

Instances
MonadRandom IO 
Instance details

Defined in Crypto.Random.Types

Methods

getRandomBytes :: ByteArray byteArray => Int -> IO byteArray #

DRG gen => MonadRandom (MonadPseudoRandom gen) 
Instance details

Defined in Crypto.Random.Types

Methods

getRandomBytes :: ByteArray byteArray => Int -> MonadPseudoRandom gen byteArray #