Random Numbers in Perl

Eric Johnson ej@netasm.com
Mon, 23 Oct 2000 10:52:14 -0700 (MST)


On Mon, 23 Oct 2000, Kevin Buettner wrote:
: On Oct 22, 11:53pm, Nathan Saper wrote:
: > Here's one for you Perl gurus out there:
: > 
: > In a Perl app I'm trying to write, I want to be able to create random
: > hex integers $bits bits long, where $bits is a user-defined variable.
: > The randomness of the numbers needs to be as good as possible, because
: > it would be used in a crypto app.
: > 
: > Any ideas?
: 
: If you're on linux, query /dev/random and use however many bits you need.
: 
: This isn't exactly portable, but I doubt that you'll find a portable
: way to obtain cryptographically strong random numbers.
: 
: Kevin

You can also check CPAN:

http://www.cpan.org/modules/by-module/Math/Math-TrulyRandom-1.0.readme
http://www.cpan.org/modules/by-module/Math/Math-TrulyRandom-1.0.tar.gz

---
Eric Johnson (ej@netasm.com)                                net.assembly
http://netasm.com/                      12629 North Tatum Boulevard #191
602 996-9682                                      Phoenix, Arizona 85032