cprng-aes 0.3.1 → 0.3.2
raw patch · 3 files changed
+7/−7 lines, 3 filesdep ~crypto-random-apiPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: crypto-random-api
API changes (from Hackage documentation)
- Crypto.Random.AESCtr: genRandomBytes :: CPRG g => g -> Int -> (ByteString, g)
+ Crypto.Random.AESCtr: genRandomBytes :: CPRG g => Int -> g -> (ByteString, g)
Files
- Benchmarks/Benchmarks.hs +2/−2
- Crypto/Random/AESCtr.hs +3/−3
- cprng-aes.cabal +2/−2
Benchmarks/Benchmarks.hs view
@@ -7,11 +7,11 @@ import System.IO.Unsafe (unsafePerformIO) import Data.IORef -gen rng n = fst (genRandomBytes rng n)+gen rng n = fst (genRandomBytes n rng) gen2 rngref n = unsafePerformIO $ do rng <- readIORef rngref- let (b, rng2) = genRandomBytes rng n+ let (b, rng2) = genRandomBytes n rng writeIORef rngref rng2 return b
Crypto/Random/AESCtr.hs view
@@ -204,9 +204,9 @@ #endif instance CPRG AESRNG where- cprgGenBytes rng len = genRanBytes rng len- cprgSupplyEntropy rng entropy = rng { aesrngState = reseedState entropy (aesrngState rng) }- cprgNeedReseed rng = getRNGReseedLimit (aesrngState rng)+ cprgGenBytes len rng = genRanBytes rng len+ cprgSupplyEntropy entropy rng = rng { aesrngState = reseedState entropy (aesrngState rng) }+ cprgNeedReseed rng = ReseedInBytes $ fromIntegral $ getRNGReseedLimit (aesrngState rng) instance RandomGen AESRNG where next rng =
cprng-aes.cabal view
@@ -1,5 +1,5 @@ Name: cprng-aes-Version: 0.3.1+Version: 0.3.2 Description: Simple crypto pseudo-random-number-generator with really good randomness property. .@@ -46,7 +46,7 @@ Build-Depends: base >= 3 && < 5 , bytestring , random- , crypto-random-api+ , crypto-random-api >= 0.2 && < 0.3 , entropy >= 0.2 Exposed-modules: Crypto.Random.AESCtr ghc-options: -Wall