view 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 source
1 // RandGen.h
3 #ifndef __CRYPTO_RAND_GEN_H
4 #define __CRYPTO_RAND_GEN_H
6 #include "Sha1.h"
8 class CRandomGenerator
9 {
10 Byte _buff[NCrypto::NSha1::kDigestSize];
11 bool _needInit;
13 void Init();
14 public:
15 CRandomGenerator(): _needInit(true) {};
16 void Generate(Byte *data, unsigned size);
17 };
19 extern CRandomGenerator g_RandomGenerator;
21 #endif