mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
make RandAddSeed() use OPENSSL_cleanse()
- removes the cstring include and is also used in RandAddSeedPerfmon()
This commit is contained in:
parent
6354935c48
commit
4eedf4ffee
@ -13,7 +13,6 @@
|
||||
#ifndef WIN32
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include <cstring> // for memset()
|
||||
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/err.h>
|
||||
@ -37,7 +36,7 @@ void RandAddSeed()
|
||||
// Seed with CPU performance counter
|
||||
int64_t nCounter = GetPerformanceCounter();
|
||||
RAND_add(&nCounter, sizeof(nCounter), 1.5);
|
||||
memset(&nCounter, 0, sizeof(nCounter));
|
||||
OPENSSL_cleanse((void*)&nCounter, sizeof(nCounter));
|
||||
}
|
||||
|
||||
void RandAddSeedPerfmon()
|
||||
|
Loading…
Reference in New Issue
Block a user