Virgil Security Crypto library  2.6.3
VirgilRandom.h
1 
37 #ifndef VIRGIL_CRYPTO_FOUNDATION_VIRGIL_RANDOM_H
38 #define VIRGIL_CRYPTO_FOUNDATION_VIRGIL_RANDOM_H
39 
40 #include <cstdlib>
41 #include <memory>
42 
43 #include "../VirgilByteArray.h"
44 
45 namespace virgil { namespace crypto { namespace foundation {
46 
50 class VirgilRandom {
51 public:
55 
61  explicit VirgilRandom(const virgil::crypto::VirgilByteArray& personalInfo);
67  explicit VirgilRandom(const std::string& personalInfo);
69 
73 
81 
87  size_t randomize();
88 
99  size_t randomize(size_t min, size_t max);
101 
102 public:
104  VirgilRandom(VirgilRandom&& rhs) noexcept;
105 
106  VirgilRandom& operator=(VirgilRandom&& rhs) noexcept;
107 
108  virtual ~VirgilRandom() noexcept;
109 
110  VirgilRandom(const VirgilRandom& rhs);
111 
112  VirgilRandom& operator=(const VirgilRandom& rhs);
113 
115 
116 private:
117  void init();
118 
119 private:
120  class Impl;
121 
122  std::unique_ptr<Impl> impl_;
123 };
124 
125 }}}
126 
127 #endif /* VIRGIL_CRYPTO_FOUNDATION_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:50