Virgil Security Crypto library  2.4.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
List of all members
virgil::crypto::foundation::VirgilRandom Class Reference

Provides randomization algorithm. More...

#include <VirgilRandom.h>

Public Member Functions

Creation / Destruction methods
 VirgilRandom (const virgil::crypto::VirgilByteArray &personalInfo)
 Initialize randomization module with personalization data. More...
 
 VirgilRandom (const std::string &personalInfo)
 Initialize randomization module with personalization data. More...
 
Randomization
virgil::crypto::VirgilByteArray randomize (size_t bytesNum)
 Produce random byte sequence. More...
 
size_t randomize ()
 
size_t randomize (size_t min, size_t max)
 

Detailed Description

Provides randomization algorithm.

Constructor & Destructor Documentation

virgil::crypto::foundation::VirgilRandom::VirgilRandom ( const virgil::crypto::VirgilByteArray personalInfo)
explicit

Initialize randomization module with personalization data.

Parameters
personalInfo(
See Also
section 8.7.1 of NIST Special Publication 800-90A).
virgil::crypto::foundation::VirgilRandom::VirgilRandom ( const std::string &  personalInfo)
explicit

Initialize randomization module with personalization data.

Parameters
personalInfo(
See Also
section 8.7.1 of NIST Special Publication 800-90A).

Member Function Documentation

virgil::crypto::VirgilByteArray virgil::crypto::foundation::VirgilRandom::randomize ( size_t  bytesNum)

Produce random byte sequence.

Parameters
bytesNumnumber of bytes to be generated.
Returns
Random byte sequence.
size_t virgil::crypto::foundation::VirgilRandom::randomize ( )

Returns a pseudo-random number.

Returns
Random Number
size_t virgil::crypto::foundation::VirgilRandom::randomize ( size_t  min,
size_t  max 
)

Returns a pseudo-random number between min and max, inclusive.

The difference between min and max can be at most std::numeric_limits<size_t>::max() - 1.

Parameters
min- minimum value.
max- maximum value. Must be greater than min.
Returns
Number between min and max, inclusive.

The documentation for this class was generated from the following file: