diff options
| author | Pieter Wuille <[email protected]> | 2016-04-16 12:25:12 +0200 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-05-29 01:52:17 +0200 |
| commit | fa2637a3beb8677067015df3d9d7b394fa837c2f (patch) | |
| tree | 9325bb10a5fe3e220d040827b82f7da5b42fc346 /src/random.h | |
| parent | Merge #8108: Trivial: Remove unused local variable shadowing upper local (diff) | |
| download | discoin-fa2637a3beb8677067015df3d9d7b394fa837c2f.tar.xz discoin-fa2637a3beb8677067015df3d9d7b394fa837c2f.zip | |
Always require OS randomness when generating secret keys
Diffstat (limited to 'src/random.h')
| -rw-r--r-- | src/random.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/random.h b/src/random.h index 1a2d3e8ee..31b80bd56 100644 --- a/src/random.h +++ b/src/random.h @@ -10,11 +10,8 @@ #include <stdint.h> -/** - * Seed OpenSSL PRNG with additional entropy data - */ +/* Seed OpenSSL PRNG with additional entropy data */ void RandAddSeed(); -void RandAddSeedPerfmon(); /** * Functions to gather random data via the OpenSSL PRNG @@ -25,6 +22,12 @@ int GetRandInt(int nMax); uint256 GetRandHash(); /** + * Function to gather random data from multiple sources, failing whenever any + * of those source fail to provide a result. + */ +void GetStrongRandBytes(unsigned char* buf, int num); + +/** * Seed insecure_rand using the random pool. * @param Deterministic Use a deterministic seed */ |