Mercurial > vba-linux
diff src/win32/7zip/7z/CPP/7zip/Crypto/RandGen.h @ 1:f9f4f1b99eed
importing src directory
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:31:27 -0600 |
parents | |
children |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/win32/7zip/7z/CPP/7zip/Crypto/RandGen.h Sat Mar 03 10:31:27 2012 -0600 1.3 @@ -0,0 +1,21 @@ 1.4 +// RandGen.h 1.5 + 1.6 +#ifndef __CRYPTO_RAND_GEN_H 1.7 +#define __CRYPTO_RAND_GEN_H 1.8 + 1.9 +#include "Sha1.h" 1.10 + 1.11 +class CRandomGenerator 1.12 +{ 1.13 + Byte _buff[NCrypto::NSha1::kDigestSize]; 1.14 + bool _needInit; 1.15 + 1.16 + void Init(); 1.17 +public: 1.18 + CRandomGenerator(): _needInit(true) {}; 1.19 + void Generate(Byte *data, unsigned size); 1.20 +}; 1.21 + 1.22 +extern CRandomGenerator g_RandomGenerator; 1.23 + 1.24 +#endif