NAME
PRSG - Perl interface to pseudo random sequence generator function.
SYNOPSIS
use Math::PRSG;
DESCRIPTION
This perl extension implements a (159, 31, 0) LFSR, giving a period of 160 bits. This can then be used as a RNG if seeded well (ie. with 160 bits of entropy) and if the output is fed through a message digest function (in order to prevent any prediction).
FUNCTIONS
- new
-
my $prsg = new PRSG $seed;
Create a new PRSG object. A 160 bit (20-byte) $seed must be provided, which is used to seed the LFSR.
- seed
-
$prsg->seed($rnd);
Seed the LFSR with $rnd.
- clock
-
$value = $prsg->clock();
Clock the LFSR, returning the new register value as a 20-byte string.
COPYRIGHT
Systemics Ltd ( http://www.systemics.com/ )