-- |-- Module : Crypto.Random.Entropy.Source-- License : BSD-style-- Maintainer : Vincent Hanquez <vincent@snarc.org>-- Stability : experimental-- Portability : Good--
module Crypto.Random.Entropy.Source where
import Foreign.Ptr
import Data.Word (Word8)
-- | A handle to an entropy maker, either a system capability-- or a hardware generator.
class EntropySourcea where
-- | try to open an handle for this sourceentropyOpen :: IO (Maybea)
-- | try to gather a number of entropy bytes into a buffer.-- return the number of actual bytes gatheredentropyGather :: a -> PtrWord8 -> Int -> IOInt-- | Close an open handleentropyClose :: a -> IO()