entropy-0.3.2: A platform independent entropy source

Portabilityportable
Stabilitybeta
MaintainerThomas.DuBuisson@gmail.com
Safe HaskellNone

System.Entropy

Description

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.

Synopsis

Documentation

getEntropy :: Int -> 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. In short, this entropy is considered cryptographically secure but not true entropy.

data CryptHandle Source

Handle for manual resource mangement

hGetEntropy :: CryptHandle -> Int -> IO ByteStringSource

Read random data from a CryptHandle