prg.hpp
Go to the documentation of this file.
1 
11 #ifndef _PRG_H_
12 #define _PRG_H_
13 
14 #include "../sha/shax.hpp"
15 
16 namespace cryptoTools {
17 
26 class PRG
27 {
28 private:
34 
38  std::vector<uint8_t> seed;
39 
44  std::vector<uint8_t> digest;
45 
49  unsigned int index;
50 
55  unsigned int seedLen;
56 
61  uint32_t counter;
62 
63 public:
69  PRG(SHAx * hash);
70 
75  void updateDigest();
76 
84  void initialize(std::vector<uint8_t> newSeed);
85 
91  uint8_t getNextRandByte();
92 
93 };
94 
95 
96 } // closing namespace
97 
98 #endif
99 
100