crypto-random-0.0.8: Simple cryptographic random related types

PortabilityGood
Stabilityexperimental
MaintainerVincent Hanquez <vincent@snarc.org>
Safe HaskellNone

Crypto.Random.Test

Description

Provide way to test usual simple statisticals test for randomness

Synopsis

Documentation

data RandomTestState Source

Mutable random test State

data RandomTestResult Source

Randomness various result relative to random bytes

Constructors

RandomTestResult 

Fields

res_totalChars :: Word64

Total number of characters

res_entropy :: Double

Entropy per byte

res_chi_square :: Double

Chi Square

res_mean :: Double

Arithmetic Mean

res_compressionPercent :: Double

Theorical Compression percent

res_probs :: [Double]

Probability of every bucket

randomTestInitialize :: IO RandomTestStateSource

Initialize new state to run tests

randomTestAppend :: RandomTestState -> ByteString -> IO ()Source

Append random data to the test state

randomTestFinalize :: RandomTestState -> IO RandomTestResultSource

Finalize random test state into some result