Portability | portable |
---|---|
Stability | beta |
Maintainer | Thomas.DuBuisson@gmail.com |
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.
- getEntropy :: ByteLength -> IO ByteString
- data CryptHandle
- openHandle :: IO CryptHandle
- hGetEntropy :: CryptHandle -> Int -> IO ByteString
- closeHandle :: CryptHandle -> IO ()
Documentation
getEntropy :: ByteLength -> IO ByteStringSource
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 Source
Handle for manual resource mangement
openHandle :: IO CryptHandleSource
Open a CryptHandle
hGetEntropy :: CryptHandle -> Int -> IO ByteStringSource
Read random data from a CryptHandle
closeHandle :: CryptHandle -> IO ()Source
Close the CryptHandle