This commit is contained in:
Igor Pavlov
2008-12-31 00:00:00 +00:00
committed by Kornel Lesiński
parent c1f1243a70
commit 3a524e5ba2
259 changed files with 2792 additions and 4855 deletions

21
CPP/7zip/Crypto/RandGen.h Executable file
View File

@@ -0,0 +1,21 @@
// RandGen.h
#ifndef __CRYPTO_RAND_GEN_H
#define __CRYPTO_RAND_GEN_H
#include "Sha1.h"
class CRandomGenerator
{
Byte _buff[NCrypto::NSha1::kDigestSize];
bool _needInit;
void Init();
public:
CRandomGenerator(): _needInit(true) {};
void Generate(Byte *data, unsigned size);
};
extern CRandomGenerator g_RandomGenerator;
#endif