|
Virgil Security Crypto library
2.5.0-rc1
|
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) |
Static Public Member Functions | |
| static void | setSeedFile (std::string path) |
| Configure path to the file that is used as a seed for a non-volatile entropy source. More... | |
| static size_t | seedFileLengthMin () |
Provides randomization algorithm.
|
explicit |
Initialize randomization module with personalization data.
| personalInfo | ( |
|
explicit |
Initialize randomization module with personalization data.
| personalInfo | ( |
| virgil::crypto::VirgilByteArray virgil::crypto::foundation::VirgilRandom::randomize | ( | size_t | bytesNum | ) |
Produce random byte sequence.
| bytesNum | number of bytes to be generated. |
| size_t virgil::crypto::foundation::VirgilRandom::randomize | ( | ) |
Returns a pseudo-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.
| min | - minimum value. |
| max | - maximum value. Must be greater than min. |
|
static |
Return minimum length of the seed file.
| VirgilCryptoException | with VirgilCryptoErrorCode::UnsupportedAlgorithm, if library is build without feature: VIRGIL_CRYPTO_FEATURE_RNG_SEED_FILE. |
|
static |
Configure path to the file that is used as a seed for a non-volatile entropy source.
| path | the path to the file. |
| VirgilCryptoException | with VirgilCryptoErrorCode::EmptyParameter, if path is empty. |
| VirgilCryptoException | with VirgilCryptoErrorCode::FileNotFound, if file at given path can not be read. |
| VirgilCryptoException | with VirgilCryptoErrorCode::UnsupportedAlgorithm, if library is build without feature: VIRGIL_CRYPTO_FEATURE_RNG_SEED_FILE. |
1.8.6