Virgil Security Crypto library  2.0.7
VirgilRandom.h
1 
37 #ifndef VIRGIL_CRYPTO_VIRGIL_RANDOM_H
38 #define VIRGIL_CRYPTO_VIRGIL_RANDOM_H
39 
40 #include <cstdlib>
41 #include <memory>
42 
43 #include <virgil/crypto/VirgilByteArray.h>
44 
45 namespace virgil { namespace crypto { namespace foundation {
46 
50 class VirgilRandom {
51 public:
55 
62  explicit VirgilRandom(const virgil::crypto::VirgilByteArray& personalInfo);
69  explicit VirgilRandom(const std::string& personalInfo);
71 
75 
83 
89  size_t randomize();
90 
101  size_t randomize(size_t min, size_t max);
103 
104 public:
106  VirgilRandom(VirgilRandom&& rhs) noexcept;
107 
108  VirgilRandom& operator=(VirgilRandom&& rhs) noexcept;
109 
110  virtual ~VirgilRandom() noexcept;
112 
113 private:
114  class Impl;
115 
116  std::unique_ptr<Impl> impl_;
117 };
118 
119 }}}
120 
121 #endif /* VIRGIL_CRYPTO_VIRGIL_RANDOM_H */
Provides randomization algorithm.
Definition: VirgilRandom.h:50
VirgilRandom(const virgil::crypto::VirgilByteArray &personalInfo)
Initialize randomization module with personalization data.
Root namespace for all Virgil Security libraries.
Definition: VirgilAsn1Compatible.h:46
std::vector< unsigned char > VirgilByteArray
This type represents a sequence of bytes.
Definition: VirgilByteArray.h:53