BSD::arc4random version 1.21
============================

This module provides a Perl API for the BSDs' arc4random(3) suite
of functions and adds a few high-level functions, such as the new
arc4random_uniform(3). The Perl functions are ithreads-safe. Scalars
can be tied to this package, yielding uniformly distributed random
numbers with an arbitrary upper bound on read access, contributing
to the entropy pool on write access. A global $RANDOM variable will
return 15-bit unsigned random numbers (in [0; 32767]), as in mksh.
Furthermore, Perl's internal PRNG is seeded with entropy obtained
from the arc4random generator once on module load time.

INSTALLATION

Perl 5.004_63 required.

Makefile.PL tries to auto-detect existence of arc4random_pushb by
looking at the operating system used; see below if this fails:

If your system does not have arc4random_pushb(3), edit the DEFINE
line in Makefile.PL to define HAVE_ARC4RANDOM_PUSHB to 0 and make
sure at least arc4random_addrandom(3) exists. *HOWEVER* note that
then, entropy pushed into the system will end up in the process's
own pool instead of in the kernel. You can fix this by regularily
calling arc4random() or arc4random_bytes() and writing the output
to /dev/urandom or similar (after obtaining permissions) FROM THE
SAME PROCESS/SCRIPT (other ithread is okay) or, better, providing
at compile time an arc4random_pushb(3)* implementation collecting
entropy, sending it to a sensible place, e.g. a gathering daemon.

*) http://www.mirbsd.org/man3/arc4random

If your system's arc4random(3) function suite is not in libc, edit
the LIBS line in Makefile.PL to include the appropriate library,
e.g. -lbsd on Debian or -lcrypt on Interix, and possibly the INC
line to use the appropriate header, e.g. something like this for
Debian libbsd: '-include /usr/include/bsd/bsd.h'

NOTE: This version of BSD::arc4random comes with an experimental
implementation tested on Debian instead, since libbsd is not yet
ready to use. This is a kludge and will go away. It is only used
automatically on Debian GNU/HURD, GNU/kFreeBSD, GNU/Linux, and
Cygwin and Solaris.

To install this module type the following:

   perl Makefile.PL
   make
   make install

DEPENDENCIES

This module requires arc4random(3) and arc4random_addrandom(3) in
libc. There are configuration options in Makefile.PL, to change
for example, if a different library like libcrypt on Interix is
required to pull in these functions.

COPYRIGHT AND LICENCE

Copyright (c) 2008 by Thorsten "mirabilos" Glaser, MirOS Project
Uploaded to CPAN by: Sebastian "Vutral" Schwarz (PAUSE ID: SJSZ)
The arc4random(9) PRNG has been invented by the OpenBSD Project.
The arc4random_uniform implementation is derived from OpenBSD
kernel code, contributed by Damien Miller.

This module is covered by the MirOS Licence: http://mirbsd.de/MirOS-Licence

___________________________________________________________________________________
$MirOS: contrib/hosted/p5/BSD/arc4random/README,v 1.15 2008/07/13 16:10:34 tg Exp $
