tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

RandGen.h (366B)


      1 // RandGen.h
      2 
      3 #ifndef __CRYPTO_RAND_GEN_H
      4 #define __CRYPTO_RAND_GEN_H
      5 
      6 #include "../../../C/Sha256.h"
      7 
      8 class CRandomGenerator
      9 {
     10  Byte _buff[SHA256_DIGEST_SIZE];
     11  bool _needInit;
     12 
     13  void Init();
     14 public:
     15  CRandomGenerator(): _needInit(true) {};
     16  void Generate(Byte *data, unsigned size);
     17 };
     18 
     19 extern CRandomGenerator g_RandomGenerator;
     20 
     21 #endif