AES-0.2.5: Fast AES encryption/decryption for bytestringsSource codeContentsIndex
This module provides a cryptographically secure PRNG based on AES, reading the seed from devrandom
randBytes :: Int -> IO ByteString
prandBytes :: Int -> IO ByteString
data AESGen
newAESGen :: IO AESGen
randBytes :: Int -> IO ByteStringSource
Randomness from a system source of nonsense such as devrandom
prandBytes :: Int -> IO ByteStringSource
Cryptographic pseudorandomness from an AES cipher. This function is currently inefficient for non-multiple-of-16 sized bytestrings.
data AESGen Source

A random number generator that gets its input from prandBytes, ensuring purity by storing those bytes for later if you don't discard the generator.

Using split on this generator isn't supported, but could be.

Please note that if an asynchronous exception is caught while a random number is being generated, the generator will be wrecked forevermore.

show/hide Instances
newAESGen :: IO AESGenSource
Produced by Haddock version 2.6.0