crypto-api-0.4.1: A generic interface for cryptographic operations

Portabilityportable
Stabilitybeta
MaintainerThomas.DuBuisson@gmail.com

System.Crypto.Random

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

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

hGetEntropy :: CryptHandle -> Int -> IO ByteStringSource

Read random data from a CryptHandle