úÎ0à,â       !"#$%&'     ()*+, -      portable betaThomas.DuBuisson@gmail.com GenCounter k) is a cryptographic BlockCipher with key k  being used in . mode to generate random bytes. /g :: GenBuffered a is a generator of type a that attempts to 4 maintain a buffer of random values size >= 1MB and <= 5MB at any time. 0g :: GenXor a b. generates bytes with sub-generators a and b  and exclusive-or'.s the outputs to produce the resulting bytes. 1g :: GenAutoReseed a b$ is a generator of type a that gets B automatically reseeded by generator b upon every 32kB generated.  reseed g ent. will reseed both the component generators by S breaking ent up into two parts determined by the genSeedLength of each generator. genBytes2 will generate the requested bytes with generator a and reseed a  using generator bA if there has been 32KB of generated data since the last reseed. N Note a request for > 32KB of data will be filled in one request to generator a before  a is reseeded by b. genBytesWithEntropy, is lifted into the same call for generator a, but % it will still reseed from generator b if the limit is hit. Reseed interval: If generator a needs a genSeedLength a = a' and generator B  needs reseeded every 2^b bytes then a GenAutoReseed a b will need reseeded every   2^15 * (2^b / a')" bytes. For the common values of a' = 128 and  2^b = 2^48 this N means reseeding every 2^56 byte. For the example numbers this translates to J about 200 years of continually generating random values at a rate of 10MB/s. 21An Alias for a Hash DRBG generator using SHA512. 2An alias for an HMAC DRBG generator using SHA512. 8The Hash DRBG state (of kind * -> *) allowing selection # of the underlying hash algorithm. 8The HMAC DRBG state (of kind * -> *) allowing selection < of the underlying hash algorithm (SHA1, SHA224 ... SHA512) newGenAutoReseed bs i creates a new  with a custom interval  of i% bytes using the provided entropy in bs. +This is for extremely long running uses of 3 instances  that can'>t explicitly reseed as often as a single underlying generator ( would need (usually every 2^48 bytes).  For example:   U newGenAutoReseedIO (2^48) :: IO (Either GenError (GenAutoReseed HashDRBG HashDRBG)) Will last for  2^48 * 2^41( bytes of randomly generated data. That's P 2^49 terabytes of random values (128 byte reseeds every 2^48 bytes generated). newGenAutoReseedIO i creates a new  with a custom  interval of i< bytes, using the system random number generator as a seed. See . 456789:;<=>)Force evaluation for use by GenBuffered. ?@ABCDEFGHIJKL3M  N       !"#$%&'()"#*%+,-./-0123456789:;<-0=-0>-0?-0@-0A-0B-0C-0D-0E-0-0F-0G-0H-0I-0JKDRBG-0.2Crypto.Random.DRBG.TypesCrypto.Random.DRBG.HMACCrypto.Random.DRBG.HashCrypto.Random.DRBGCrypto.Random.DRBG.HashDFCrypto.Random.DRBG.Util RandomBitsAdditionalInputNoncePersonalizationStringEntropyBitLenStatereseedInterval instantiatereseedgenerate SeedLengthseedlen GenCounter GenBufferedGenXor GenAutoReseedHashDRBGHmacDRBG HashDRBGWith HmacDRBGWithnewGenAutoReseednewGenAutoReseedIOhash_dfincBSi2bsbs2iStvaluekeycounterhashAlgValueKeyupdateconstanthshhashGencrypto-api-0.6.1 Crypto.Modesctr Crypto.RandomCryptoRandomGenseed rightProxyhelper1helper2 helperXor1 helperXor2proxyToGenBufferednewGenBufferednewGenBufferedIOwrapErrevalsplitGen GenErrorOtherRequestedTooManyBytes RangeInvalid NeedReseedNotEnoughEntropyNeedsInfiniteSeedGenErrornewGenIOgenBytesWithEntropygenBytes genSeedLengthnewGen SystemRandom