[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS: cvs.openbsd.org: src
- To: source-changes_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org
- Subject: CVS: cvs.openbsd.org: src
- From: Otto Moerbeek <otto_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org>
- Date: Sun, 16 Mar 2008 13:47:44 -0600 (MDT)
CVSROOT: /cvs
Module name: src
Changes by: otto_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org 2008/03/16 13:47:43
Modified files:
lib/libc/crypt : arc4random.3 arc4random.c
include : stdlib.h
Log message:
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@
Visit your host, monkey.org