cryptonite-0.15: Cryptography Primitives sink

LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
PortabilityGood
Safe HaskellNone
LanguageHaskell2010

Crypto.Random.EntropyPool

Description

 

Synopsis

Documentation

data EntropyPool

Pool of Entropy. contains a self mutating pool of entropy, that is always guarantee to contains data.

createEntropyPool :: IO EntropyPool

Create a new entropy pool with a default size.

While you can create as many entropy pool as you want, the pool can be shared between multiples RNGs.

createEntropyPoolWith :: Int -> [EntropyBackend] -> IO EntropyPool

Create a new entropy pool of a specific size

While you can create as many entropy pool as you want, the pool can be shared between multiples RNGs.

getEntropyFrom :: ByteArray byteArray => EntropyPool -> Int -> IO byteArray

Grab a chunk of entropy from the entropy pool.