my $devrandom = IO::File->new('/dev/random', 'r');
my $rng = Crypt::Nettle::Yarrow->new();
my $data = $rng->random(32);
ABSTRACTCrypt::Nettle::Yarrow provides an object interface to the Yarrow256 random number generator from the nettle C library.
new()Create a new Yarrow256 PRNG.
seed($data)Set up an initial seed of the generator from unguessable $data.
random($length)Return a scalar with $length random octets.
is_seeded()Returns 1 if the generator is seeded.
SEED_FILE_SIZEThe size of the seed file for Yarrow256.
slow_reseed()Cause a fast or slow reseed to take place immediately, regardless of the current entropy estimates of the two pools. Use with care.
BUGS AND FEEDBACKUpdating the pool is not yet implemented.
It would be nice to have a convenience function for seeding from /dev/random if the file is available.
Crypt::Nettle::Yarrow has no other known bugs, mostly because no one has found them yet. Please write mail to the maintainer ([email protected]) with your contributions, comments, suggestions, bug reports or complaints.
AUTHORS AND CONTRIBUTORSDaniel Kahn Gillmor <[email protected]>
COPYRIGHT AND LICENSECopyright AX Daniel Kahn Gillmor
Crypt::Nettle::Yarrow is free software, you may redistribute it and/or modify it under the GPL version 2 or later (your choice). Please see the COPYING file for the full text of the GPL.
DISCLAIMERThis software is provided by the copyright holders and contributors ``as is'' and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.