1{-# LANGUAGE CPP, ForeignFunctionInterface, BangPatterns, ScopedTypeVariables #-}
3 Maintainer: Thomas.DuBuisson@gmail.com
7 Obtain entropy from system sources or x86 RDRAND when available.
11 - Windows via CryptoAPI
12 - *nix systems via @\/dev\/urandom@
14 - Xen (only when RDRAND is available)
20 module System.EntropyWindows
22import System.EntropyWindows
25 module System.EntropyXen
27import System.EntropyXen
29 module System.EntropyNix
31import System.EntropyNix
35import qualified Data.ByteString as B
37-- |Get a specific number of bytes of cryptographically
38-- secure random data using the system-specific facilities.
40-- Use RDRAND if available and XOR with '/dev/urandom' on *nix and CryptAPI when on
41-- Windows. In short, this entropy is considered cryptographically secure
42-- but not true entropy.
43getEntropy :: Int -> IO B.ByteString
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list