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