Crypto.Random.EntropyPool

crypton-1.0.1: Cryptography Primitives sink

License | BSD-style
Maintainer | Vincent Hanquez <vincent@snarc.org>
Stability | experimental
Portability | Good
Safe Haskell | None
Language | Haskell2010

Crypto.Random.EntropyPool

Description

Synopsis

- data EntropyPool
- createEntropyPool :: IO EntropyPool
- createEntropyPoolWith :: Int -> [EntropyBackend] -> IO EntropyPool
- getEntropyFrom :: ByteArray byteArray => EntropyPool -> Int -> IO byteArray

# Documentation

data EntropyPool #

Pool of Entropy. Contains a self-mutating pool of entropy, that is always guaranteed to contain data.

createEntropyPool :: IO EntropyPool #

Create a new entropy pool with a default size.

While you can create as many entropy pools 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 pools 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.