License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | Good |
Safe Haskell | None |
Language | Haskell98 |
Crypto.Random.Test
Description
Provide way to test usual simple statisticals test for randomness
Synopsis
- data RandomTestState
- data RandomTestResult = RandomTestResult {
- res_totalChars :: Word64
- res_entropy :: Double
- res_chi_square :: Double
- res_mean :: Double
- res_compressionPercent :: Double
- res_probs :: [Double]
- randomTestInitialize :: IO RandomTestState
- randomTestAppend :: RandomTestState -> ByteString -> IO ()
- randomTestFinalize :: RandomTestState -> IO RandomTestResult
Documentation
data RandomTestState Source #
Mutable random test State
data RandomTestResult Source #
Randomness various result relative to random bytes
Constructors
RandomTestResult | |
Fields
|
Instances
Eq RandomTestResult Source # | |
Defined in Crypto.Random.Test Methods (==) :: RandomTestResult -> RandomTestResult -> Bool (/=) :: RandomTestResult -> RandomTestResult -> Bool | |
Show RandomTestResult Source # | |
Defined in Crypto.Random.Test Methods showsPrec :: Int -> RandomTestResult -> ShowS show :: RandomTestResult -> String showList :: [RandomTestResult] -> ShowS |
randomTestInitialize :: IO RandomTestState Source #
Initialize new state to run tests
randomTestAppend :: RandomTestState -> ByteString -> IO () Source #
Append random data to the test state
randomTestFinalize :: RandomTestState -> IO RandomTestResult Source #
Finalize random test state into some result