mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Make sure that GetRandomBytes never fails
We're using GetRandomBytes in several contexts where it's either unwieldy to return an error, or an error would mean a fatal exception anyhow. @gmaxwell checked OpenSSL a while ago and discovered that it never actually fails, but it can't hurt to be a bit paranoid here.
This commit is contained in:
@@ -19,7 +19,7 @@ void RandAddSeedPerfmon();
|
||||
/**
|
||||
* Functions to gather random data via the OpenSSL PRNG
|
||||
*/
|
||||
bool GetRandBytes(unsigned char* buf, int num);
|
||||
void GetRandBytes(unsigned char* buf, int num);
|
||||
uint64_t GetRand(uint64_t nMax);
|
||||
int GetRandInt(int nMax);
|
||||
uint256 GetRandHash();
|
||||
|
||||
Reference in New Issue
Block a user