| crypto-api-0.2.1: A generic interface for cryptographic operations | Contents | Index
System.Crypto.Random |
Portability | portable
Stability | beta
Maintainer | Thomas.DuBuisson@gmail.com
Description
Obtain entropy from system sources. This module is rather untested on Windows (or testers never provided feedback), though testing was requested from the community - please e-mail the maintainer with test results.
Synopsis
getEntropy :: ByteLength -> IO ByteString
data CryptHandle
openHandle :: IO CryptHandle
hGetEntropy :: CryptHandle -> Int -> IO ByteString
closeHandle :: CryptHandle -> IO ()
Documentation
getEntropy :: ByteLength -> IO ByteString
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.
data CryptHandle
Handle for manual resource mangement
openHandle :: IO CryptHandle
Open a `CryptHandle`
hGetEntropy :: CryptHandle -> Int -> IO ByteString
Read random data from a `CryptHandle`
closeHandle :: CryptHandle -> IO ()
Close the `CryptHandle`
Produced by Haddock version 2.7.2