Skip to content

Commit aa09ccb

Browse files
committed
squashme: comment that NUM_OS_RANDOM_BYTES should not be changed lightly
1 parent 224e6eb commit aa09ccb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/random.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ class FastRandomContext {
4646
uint32_t Rw;
4747
};
4848

49-
/* Number of random bytes returned by GetOSRand */
49+
/* Number of random bytes returned by GetOSRand.
50+
* When changing this constant make sure to change all call sites, and make
51+
* sure that the underlying OS APIs for all platforms support the number.
52+
* (many cap out at 256 bytes).
53+
*/
5054
static const ssize_t NUM_OS_RANDOM_BYTES = 32;
5155

5256
/** Get 32 bytes of system entropy. Do not use this in application code: use

0 commit comments

Comments
 (0)