diff options
author | 2008-03-16 19:47:43 +0000 | |
---|---|---|
committer | 2008-03-16 19:47:43 +0000 | |
commit | f7b5bfc7f04e8d73cac5bdb11597072d7f605db7 (patch) | |
tree | 9f28fc92da17658496afe0b5879efc12c35f9980 /lib/libpthread | |
parent | indent (diff) | |
download | wireguard-openbsd-f7b5bfc7f04e8d73cac5bdb11597072d7f605db7.tar.xz wireguard-openbsd-f7b5bfc7f04e8d73cac5bdb11597072d7f605db7.zip |
diff from djm@ committed at his request:
introduce two new APIs for requesting strong random numbers:
arc4random_buf() - fill an arbitrary memory range with random numbers
arc4random_uniform() - return a uniformly distributed random number
below
a specified upper bound, avoiding the bias that comes from a naive
"arc4random() % upper_bound" construction.
these mirror similarly-named functions in the kernel;
lots of discussion deraadt@ mcbride@
Diffstat (limited to 'lib/libpthread')
0 files changed, 0 insertions, 0 deletions