| BaseRandomTest Class |
|
|
|
|
Abstract class
Implements the base class for all random test classes.
The class contains:
Constructors & Destructor
Initializer methods
Class methods
Class Constructors & Destructors
|
|
|
BaseRandomTest (); |
| |
|
Creates an object of the base class, sets the default values for common members of all derived classes and creates the MathematicalFunctions object needed to execute the specific random test. |
|
|
|
BaseRandomTest (MathematicalFunctions* functions); |
| |
|
Creates an object of the base class, sets the default values for common members of all derived classes and sets the MathematicalFunctions object functions passed as the MathematicalFunctions object needed to execute the specific random test.
If no MathematicalFunctions object functions is passed (NULL value), the constructor creates by itself the corresponding MathematicalFunctions object. |
|
|
|
void Initialize(void); |
| |
|
Sets the default values to all common members. |
|
|
|
void SetAlpha (double alpha); |
| |
|
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%. |
|
|
|
virtual bool IsRandom (BaseCryptoRandomStream* stream); [ Virtual method ] |
| |
|
Performs the specific randomness test.
Checks randomness of BaseCryptoRandomStream stream parameter and returns 0 (false randomness) or 1 (true randomness).
Is a virtual function that must be defined for each one of the classes derived from this class if you want to create an object of that class.
|
|
|
|
bool IsRandom (void); |
| |
|
Gets randomness of the last checked BaseCryptoRandomStream, returns 0 (false randomness) or 1 (true randomness). |
|
|
|
double GetPValue (void); |
| |
|
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); |
| |
|
Gets the alpha of the random test object. |
|
|
|
virtual RandomTests GetType (void); [ Virtual method ] |
| |
|
Gets the random test type (the algorithm that implements) of the object.
Returns one of the RandomTests values.
Is a virtual function that must be defined for each one of the classes derived from this class if you want to create an object of that class.
|
|
|
|
virtual unsigned int GetMinimumLength (void); [ Virtual method ] |
| |
|
Gets the minimum length that the stream must have for the specific random test class.
Is a virtual function that must be defined for each one of the classes derived from this class if you want to create an object of that class.
|
|
|
|
RandomTestErrors GetError (void); |
| |
|
Gets the error of the last checked BaseCryptoRandomStream.
Returns one of the RandomTestErrors values.
If no error has been produced, the value is set to NoError. |
You can check the page Used Symbols for an explanation of the symbols near the information.
|
|
|