diff options
Diffstat (limited to 'CPP/7zip/Crypto/Hash/RandGen.cpp')
-rwxr-xr-x | CPP/7zip/Crypto/Hash/RandGen.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CPP/7zip/Crypto/Hash/RandGen.cpp b/CPP/7zip/Crypto/Hash/RandGen.cpp index 9ae36155..a030a0d2 100755 --- a/CPP/7zip/Crypto/Hash/RandGen.cpp +++ b/CPP/7zip/Crypto/Hash/RandGen.cpp @@ -28,7 +28,7 @@ // Maybe it's possible to restore original timer value from generated value. void CRandomGenerator::Init() -{ +{ NCrypto::NSha1::CContext hash; hash.Init(); @@ -82,7 +82,7 @@ void CRandomGenerator::Init() static NWindows::NSynchronization::CCriticalSection g_CriticalSection; void CRandomGenerator::Generate(Byte *data, unsigned int size) -{ +{ g_CriticalSection.Enter(); if (_needInit) Init(); |