Friday, 10 September 2010

C++ DiceLockSecurity Namespace

Source Code

HOW TO

BaseRandomTest Print E-mail
BaseRandomTest Class   d-64class-abst.png
Get FREE DiceChecker C++
Random Number Test
Windows DLL

Abstract class


Implements the base class for all random test classes.

The class contains:

  Constructors & Destructor
  Initializer methods
  Class methods



Class Constructors & Destructors

d-const.png

  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.

d-const.png

  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.

d-dest.png

  ~BaseRandomTest ();
    Destroys the object and clears all common members, if a MathematicalFunctions object has been created when the object was created, the MathematicalFunctions object is destroyed.



Class Cleaners

d-reset.png

  void Initialize(void);
    Sets the default values to all common members.

Class Methods

d-set.png

  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%.

d-abstract.png

  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.   


d-get.png

  bool IsRandom (void); 
    Gets randomness of the last checked BaseCryptoRandomStream, returns 0 (false randomness) or 1 (true randomness).

d-get.png

  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. 

d-get.png

  double GetAlpha (void);  
    Gets the alpha of the random test object.

d-abstract.png

  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. 

d-abstract.png

  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. 

d-get.png

  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.

 

Please, let us know the usefulness of the information, it will allow us to be able to improve the support.

Was the information useful?

Vote
 
 



Close Me  
Get FREE Random Number Test Windows DLL !
Get FREE Hash Algorithms Windows DLL !