License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <[email protected]> |
Stability | experimental |
Portability | Good |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Crypto.Random.Entropy.Unsafe
Description
Synopsis
- replenish :: Int -> [EntropyBackend] -> Ptr Word8 -> IO ()
- gatherBackend :: EntropyBackend -> Ptr Word8 -> Int -> IO Int
- supportedBackends :: [IO (Maybe EntropyBackend)]
- data EntropyBackend
Documentation
replenish :: Int -> [EntropyBackend] -> Ptr Word8 -> IO () Source #
Refill the entropy in a buffer
Call each entropy backend in turn until the buffer has been replenished.
If the buffer cannot be refill after 3 loopings, this will raise an User Error exception
Arguments
:: EntropyBackend | An open Entropy Backend |
-> Ptr Word8 | Pointer to a buffer to write to |
-> Int | number of bytes to write |
-> IO Int | return the number of bytes actually written |
Gather randomness from an open handle
supportedBackends :: [IO (Maybe EntropyBackend)] Source #
All supported backends
data EntropyBackend Source #
Any Entropy Backend