diff options
| author | Wladimir J. van der Laan <[email protected]> | 2017-02-22 07:38:42 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2017-02-22 07:38:42 +0100 |
| commit | aa09ccbb74ea9febd83ce3362238ac5339069909 (patch) | |
| tree | 4a8ea8517910e15a3a89d12dce57e1663eb190d6 | |
| parent | util: Specific GetOSRandom for Linux/FreeBSD/OpenBSD (diff) | |
| download | discoin-aa09ccbb74ea9febd83ce3362238ac5339069909.tar.xz discoin-aa09ccbb74ea9febd83ce3362238ac5339069909.zip | |
squashme: comment that NUM_OS_RANDOM_BYTES should not be changed lightly
| -rw-r--r-- | src/random.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/random.h b/src/random.h index 0e8bb2717..29de58731 100644 --- a/src/random.h +++ b/src/random.h @@ -46,7 +46,11 @@ public: uint32_t Rw; }; -/* Number of random bytes returned by GetOSRand */ +/* Number of random bytes returned by GetOSRand. + * When changing this constant make sure to change all call sites, and make + * sure that the underlying OS APIs for all platforms support the number. + * (many cap out at 256 bytes). + */ static const ssize_t NUM_OS_RANDOM_BYTES = 32; /** Get 32 bytes of system entropy. Do not use this in application code: use |