|
UniversalTest (Universal Random Test) |
|
|
| UniversalTest Class |
|
|
|
|
Derived class from: BaseRandomTest
Implements the Universal random test.
The class contains:
Constructors & Destructor
Initializer methods
Class methods
Specific Class methods
Class Constructors & Destructor
|
|
|
UniversalTest (); |
| |
|
Creates an object of the class, sets the default values for members
and creates the MathematicalFunctions object needed to execute the random test.
|
|
|
|
UniversalTest (MathematicalFunctions* functions); |
| |
|
|
|
|
|
~UniversalTest (); |
| |
|
|
|
|
|
void SetAlpha (double alpha); [ Inherited from BaseRandomTest ] |
| |
|
Sets the alpha value for the random test object.
Alpha is the significance level that determines the region of acceptance and rejection.
For example, if alpha is set to >= 0,001 then we are demanding a confidence level of 99,9%.
|
|
|
|
bool IsRandom (BaseCryptoRandomStream* stream); [ Overridden, BaseRandomTest virtual method defined ] |
| |
|
Performs the specific randomness test.
Checks randomness of BaseCryptoRandomStream stream parameter and returns 0 (false randomness) or 1 (true randomness).
|
|
|
|
double GetPValue (void); [ Inherited from BaseRandomTest ]
|
| |
|
Gets PValue of the last checked BaseCryptoRandomStream .
PValue is the probability that a perfect random number generator would have produced a sequence less random than the BaseCryptoRandomStream checked, given the kind of non-randomness assessed by the test.
|
|
|
|
double GetAlpha (void); [ Inherited from BaseRandomTest ]
|
| |
|
Gets the alpha of the random test object.
|
|
|
|
RandomTests GetType (void); [ Overridden, BaseRandomTest virtual method defined ] |
| |
|
Gets the random test type (the algorithm that implements) of the object.
Returns the corresponding RandomTests value.
|
|
|
|
unsigned int GetMinimumLength (void); [ Overridden, BaseRandomTest virtual method defined ] |
| |
|
Gets the minimum length that the BaseCryptoRandomStream must have in order to perform the random test.
|
|
|
|
int GetL (void);
|
| |
|
Gets the "L" result, as specified at Universal test. |
|
|
|
int GetQ (void);
|
| |
|
Gets the "Q" result, as specified at Universal test. |
|
|
|
int GetK (void);
|
| |
|
Gets the "Q" result, as specified at Universal test. |
|
|
|
double GetSigma (void);
|
| |
|
Gets the "sigma" result. |
|
|
|
double GetPhi (void);
|
| |
|
Gets the "phi" result. |
|
|
|
double GetSum (void);
|
| |
|
Gets the "sum" result. |
|
|
|
double GetExpectedValueResult (void);
|
| |
|
Gets the "expectedValue" result. |
|
|
|
double GetVarianceResult (void);
|
| |
|
Gets the "varianceResult" result. |
|
|
|
int GetBitsDiscarded (void);
|
| |
|
Gets the "bitsDiscarded" result, the numbers of bits not tested. |
You can check the page Used Symbols for an explanation of the symbols near the information.
|
|
|