if (ret == ERROR_SUCCESS)
{
RAND_add(pdata, nSize, nSize/100.0);
- memset(pdata, 0, nSize);
+ OPENSSL_cleanse(pdata, nSize);
printf("RandAddSeed() %lu bytes\n", nSize);
}
#endif
int GetRandInt(int nMax)
{
- return GetRand(nMax);
+ return static_cast<int>(GetRand(nMax));
}
uint256 GetRandHash()