| RandomTestSuite Class |
|
|
|
|
Class
Implements the suite class to check different random tests of BaseCryptoRandomStream objects.
The class contains:
Constructors & Destructor
Initializer methods
Class methods
Class Constructors & Destructors
|
|
|
RandomTestSuite (); |
| |
|
Creates an object of the class, sets the default values for members.
|
 |
|
None random test object is created, a default MathematicalFunctions object is created for the random tests instantiated in the suite. |
|
|
|
|
RandomTestSuite (MathematicalFunctions* mathFuncs) |
| |
|
Creates an object of the class, sets the default values for members.
|
 |
|
None random test object is created, the MathematicalFunctions object mathFuncs is the MathematicalFunctions object for the random tests instantiated in the suite. |
|
|
|
|
~RandomTestSuite (); |
| |
|
Destroys the object and clears all members.
|
 |
|
If the RandomTestSuite object contains any instantiated random test object credated by the suite, the random test object is deleted. If the MathematicalFunctions object was instantiated by the suite, then the MathematicalFunctions object is deleted. |
|
|
|
|
void Initialize (void); |
| |
|
Initializes all random tests objects in the suite. |
|
|
|
void Add (BaseRandomTest* test); |
| |
|
|
|
|
|
void Add (RandomTests test); |
| |
|
Creates and adds a random test to the suite based in the enumerated RandomTests test.
|
 |
|
The random test will use the MathematicalFunctions object instantiated by the suite.
|
|
|
|
|
void AddAll (void); |
| |
|
Instantites and adds all random tests to the suite object.
|
 |
|
All random tests will use the MathematicalFunctions object instantiated by the suite.
|
|
|
|
|
void AddFrequencyTest (void); |
| |
|
|
|
|
|
void AddBlockFrequencyTest (void); |
| |
|
|
|
|
|
void AddRunsTest (void); |
| |
|
Creates and adds a Runs random test to the suite.
|
 |
|
The random test will use the MathematicalFunctions object instantiated by the suite.
|
|
|
|
|
void AddLongestRunOfOnesTest (void); |
| |
|
|
|
|
|
void AddCumulativeSumForwardTest (void); |
| |
|
|
|
|
|
void AddCumulativeSumReverseTest (void); |
| |
|
|
|
|
|
void AddRankTest (void); |
| |
|
Creates and adds a Rank random test to the suite.
|
 |
|
The random test will use the MathematicalFunctions object instantiated by the suite.
|
|
|
|
|
void AddOverlappingTemplateMatchingsTest (void); |
| |
|
|
|
|
|
void AddUniversalTest (void); |
| |
|
|
|
|
|
void AddApproximateEntropyTest (void); |
| |
|
|
|
|
|
void AddSerialTest (void); |
| |
|
Creates and adds a Serial random test to the suite.
|
 |
|
The random test will use the MathematicalFunctions object instantiated by the suite.
|
|
|
|
|
void AddDiscreteFourierTransformTest (void); |
| |
|
|
|
|
|
void AddLinearComplexityTest (void); |
| |
|
|
|
|
|
BaseRandomTest* GetRandomTest (RandomTests test); |
| |
|
Gets a pointer to a random test object of the suite based in the RandomTests enumerated random test test.
|
|
|
|
FrequencyTest* GetFrequencyTest (void); |
| |
|
Gets the pointer to the Frequency random test object of the suite object. |
|
|
|
BlockFrequencyTest* GetBlockFrequencyTest (void); |
| |
|
Gets the pointer to the Block Frequency random test object of the suite object. |
|
|
|
RunsTest* GetRunsTest (void); |
| |
|
Gets the pointer to the Runs random test object of the suite object. |
|
|
|
LongestRunOfOnesTest* GetLongestRunOfOnesTest (void); |
| |
|
Gets the pointer to the Longest Runs Of Ones random test object of the suite object. |
|
|
|
CumulativeSumForwardTest* GetCumulativeSumForwardTest (void); |
| |
|
Gets the pointer to the Cumulative Sum Forward random test object of the suite object. |
|
|
|
CumulativeSumReverseTest* GetCumulativeSumReverseTest (void); |
| |
|
Gets the pointer to the Cumulative Sum Reverse random test object of the suite object. |
|
|
|
RankTest* GetRankTest (void); |
| |
|
Gets the pointer to the Rank random test object of the suite object. |
|
|
|
OverlappingTemplateMatchingsTest* GetOverlappingTemplateMatchingsTest (void); |
| |
|
Gets the pointer to the Overlapping Template Matchings random test object of the suite object. |
|
|
|
UniversalTest* GetUniversalTest (void); |
| |
|
Gets the pointer to the Universal random test object of the suite object. |
|
|
|
ApproximateEntropyTest* GetApproximateEntropyTest (void); |
| |
|
Gets the pointer to the Approximate Entropy random test object of the suite object. |
|
|
|
SerialTest* GetSerialTest (void); |
| |
|
Gets the pointer to the Serial random test object of the suite object. |
|
|
|
DiscreteFourierTransformTest* GetDiscreteFourierTransformTest (void); |
| |
|
Gets the pointer to the Discrete Fourier Transform random test object of the suite object. |
|
|
|
LinearComplexityTest* GetLinearComplexityTest (void); |
| |
|
Gets the pointer to the Linear Complexity random test object of the suite object. |
|
|
|
void Remove (BaseRandomTest* test); |
| |
|
Removes the pointed BaseRandomTest random test test from the suite.
|
 |
|
If the random test has been instantiated by the suite, it is deleted the random test object. If the random test object has been provided to the suite, the random test is removed from the suite, but it is not deleted.
|
|
|
|
|
void Remove (RandomTests test); |
| |
|
Removes a random test of the suite based in the RandomTests enumerated random test test.
|
 |
|
If the random test has been instantiated by the suite, it is deleted the random test object. If the random test object has been provided to the suite, the random test is removed from the suite, but it is not deleted.
|
|
|
|
|
void RemoveAll (void); |
| |
|
Removes all instantiated random tests of the suite.
|
 |
|
All random test objects instantiated by the suite, are deleted. All random test objects provided to
the suite, are removed from the suite, but they are not
deleted.
|
|
|
|
|
void RemoveFrequencyTest (void); |
| |
|
Removes the Frequency random test object of the suite object.
|
 |
|
If the random test has been instantiated by the suite, it is deleted the random test object. If the random test object has been provided to the suite, the random test is removed from the suite, but it is not deleted.
|
|
|
|
|
void RemoveBlockFrequencyTest (void); |
| |
|
Removes the Block Frequency random test object of the suite object.
|
 |
|
If the random test has been instantiated by the suite, it is deleted the random test object. If the random test object has been provided to the suite, the random test is removed from the suite, but it is not deleted.
|
|
|
|
|
void RemoveRunsTest (void); |
| |
|
Removes the Runs random test object of the suite object.
|
 |
|
If the random test has been instantiated by the suite, it is deleted the random test object. If the random test object has been provided to the suite, the random test is removed from the suite, but it is not deleted.
|
|
|
|
|
void RemoveLongestRunOfOnesTest (void); |
| |
|
Removes the Longest Runs Of Ones random test object of the suite object.
|
 |
|
If the random test has been instantiated by the suite, it is deleted the random test object. If the random test object has been provided to the suite, the random test is removed from the suite, but it is not deleted.
|
|
|
|
|
void RemoveCumulativeSumForwardTest (void); |
| |
|
Removes the Cumulative Sum Forward random test object of the suite object.
|
 |
|
If the random test has been instantiated by the suite, it is deleted the random test object. If the random test object has been provided to the suite, the random test is removed from the suite, but it is not deleted.
|
|
|
|
|
void RemoveCumulativeSumReverseTest (void); |
| |
|
Removes the Cumulative Sum Reverse random test object of the suite object.
|
 |
|
If the random test has been instantiated by the suite, it is deleted the random test object. If the random test object has been provided to the suite, the random test is removed from the suite, but it is not deleted.
|
|
|
|
|
void RemoveRankTest (void); |
| |
|
Removes the Rank random test object of the suite object.
|
 |
|
If the random test has been instantiated by the suite, it is deleted the random test object. If the random test object has been provided to the suite, the random test is removed from the suite, but it is not deleted.
|
|
|
|
|
void RemoveOverlappingTemplateMatchingsTest (void); |
| |
|
Removes the Overlapping Template Matchings random test object of the suite object.
|
 |
|
If the random test has been instantiated by the suite, it is deleted the random test object. If the random test object has been provided to the suite, the random test is removed from the suite, but it is not deleted.
|
|
|
|
|
void RemoveUniversalTest (void); |
| |
|
Removes the Universal random test object of the suite object.
|
 |
|
If the random test has been instantiated by the suite, it is deleted the random test object. If the random test object has been provided to the suite, the random test is removed from the suite, but it is not deleted.
|
|
|
|
|
void RemoveApproximateEntropyTest (void); |
| |
|
Removes the Approximate Entropy random test object of the suite object.
|
 |
|
If the random test has been instantiated by the suite, it is deleted the random test object. If the random test object has been provided to the suite, the random test is removed from the suite, but it is not deleted.
|
|
|
|
|
void RemoveSerialTest (void); |
| |
|
Removes the Serial random test object of the suite object.
|
 |
|
If the random test has been instantiated by the suite, it is deleted the random test object. If the random test object has been provided to the suite, the random test is removed from the suite, but it is not deleted.
|
|
|
|
|
void RemoveDiscreteFourierTransformTest (void); |
| |
|
Removes the Discrete Fourier Transform random test object of the suite object.
|
 |
|
If the random test has been instantiated by the suite, it is deleted the random test object. If the random test object has been provided to the suite, the random test is removed from the suite, but it is not deleted.
|
|
|
|
|
void RemoveLinearComplexityTest (void); |
| |
|
Removes the Linear Complexity random test object of the suite object.
|
 |
|
If the random test has been instantiated by the suite, it is deleted the random test object. If the random test object has been provided to the suite, the random test is removed from the suite, but it is not deleted.
|
|
|
|
|
bool IsRandom (BaseCryptoRandomStream* stream); |
| |
|
Tests the BaseCryptoRandomStream stream untill an error is found with all instantiated random tests and returns the random value. |
|
|
|
bool TestRandom (BaseCryptoRandomStream* stream); |
| |
|
Tests the BaseCryptoRandomStream stream with all instantiated random tests and returns the random value. |
|
|
|
void SetAlpha (double alpha); |
| |
|
Sets alpha alpha to all random tests object in the suite object. |
|
|
|
int GetInstantiatedTests (void); |
| |
|
Gets the number of Random Tests that contains the suite object. |
|
|
|
RandomTests GetNonRandomTest (void); |
| |
|
Gets the failed random test in the RandomTestSuite object. |
|
|
|
bool Exist (RandomTests test); |
| |
|
Indicates if the RandomTests test object test exists in the suite |
|
|
|
RandomTests GetMaximumNumberOfTests (void); |
| |
|
Gets the number of random tests that can be used in the RandomTestSuite object. |
You can check the page Used Symbols for an explanation of the symbols near the information.
|
|
|