-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A platform independent entropy source
--
-- A platform independent method to obtain cryptographically strong
-- entropy (urandom on Linux, CryptAPI on Windows, patches welcome).
-- Users looking for cryptographically strong (number-theoretically
-- sound) PRNGs should see the DRBG package too!
@package entropy
@version 0.3
-- | Obtain entropy from system sources or x86 RDRAND when available.
--
-- Currently supporting:
--
--
-- - Windows via CryptoAPO - *nix systems via /dev/urandom -
-- QNX - Xen only when RDRAND is available.
--
module System.Entropy
-- | Inefficiently get a specific number of bytes of cryptographically
-- secure random data using the system-specific facilities.
--
-- Use '/dev/urandom' on *nix and CryptAPI when on Windows. In short,
-- this entropy is considered cryptographically secure but not true
-- entropy.
getEntropy :: Int -> IO ByteString
-- | Handle for manual resource mangement
data CryptHandle
-- | Open a CryptHandle
openHandle :: IO CryptHandle
-- | Read random data from a CryptHandle
hGetEntropy :: CryptHandle -> Int -> IO ByteString
-- | Close the CryptHandle
closeHandle :: CryptHandle -> IO ()