cprng-aes 0.2.1 → 0.2.2
raw patch · 3 files changed
+26/−3 lines, 3 filesdep +entropydep ~crypto-apidep ~randomPVP ok
version bump matches the API change (PVP)
Dependencies added: entropy
Dependency ranges changed: crypto-api, random
API changes (from Hackage documentation)
Files
- Crypto/Random/AESCtr.hs +1/−1
- README.md +22/−0
- cprng-aes.cabal +3/−2
Crypto/Random/AESCtr.hs view
@@ -24,7 +24,7 @@ import Crypto.Random import System.Random (RandomGen(..))-import System.Crypto.Random (getEntropy)+import System.Entropy (getEntropy) import qualified Crypto.Cipher.AES as AES import Data.ByteString (ByteString)
README.md view
@@ -13,3 +13,25 @@ let (ran, rng') = getRandomBytes rng 1024 it's also an instance of CryptoRandomGen from the crypto-api package.++Statistics+----------++Using ent, a randomness property maker on one 1Mb sample.++cprng-AES:++ Entropy = 7.999837 bits per byte.+ Optimum compression would reduce the size of this 1048576 byte file by 0 percent.+ Chi square distribution for 1048576 samples is 237.02.+ Arithmetic mean value of data bytes is 127.3422 (127.5 = random).+ Monte Carlo value for Pi is 3.143589568 (error 0.06 percent).++Compared to urandom with the same sampling:++ Entropy = 7.999831 bits per byte.+ Optimum compression would reduce the size of this 1048576 byte file by 0 percent.+ Chi square distribution for 1048576 samples is 246.63.+ Arithmetic mean value of data bytes is 127.6347 (127.5 = random).+ Monte Carlo value for Pi is 3.132465868 (error 0.29 percent).+
cprng-aes.cabal view
@@ -1,5 +1,5 @@ Name: cprng-aes-Version: 0.2.1+Version: 0.2.2 Description: Simple crypto pseudo-random-number-generator with really good randomness property. .@@ -34,7 +34,8 @@ Build-Depends: base >= 3 && < 5 , bytestring , random- , crypto-api >= 0.5+ , crypto-api >= 0.8+ , entropy >= 0.2 , cryptocipher >= 0.2.5 && < 0.3.0 , cereal >= 0.3.0 && < 0.4.0 Exposed-modules: Crypto.Random.AESCtr