Initializing Perl's rand

Sam Couter scouter at bigpond.net.au
Tue Jun 25 12:09:26 EST 2002


Doug.Palmer at csiro.au <Doug.Palmer at csiro.au> wrote:
> time() has only second resolution and MacPerl may not have decent access to
> a process ID. So there may not be much randomness going on. At the very
> least, hashing the value of time() -- perhaps with Crypt::SHA for good
> entropy -- would be a good idea.

What do you think the PRNG does with the seed you give it?

If time() has one-second resolution, then hash(time()) will also have
one-second resolution.
-- 
Sam "Eddie" Couter  |  mailto:scouter at bigpond.net.au
Debian Developer    |  mailto:eddie at debian.org
                    |  jabber:sam at jabber.topic.com.au
OpenPGP fingerprint:  A46B 9BB5 3148 7BEA 1F05  5BD5 8530 03AE DE89 C75C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/linux/attachments/20020625/83ed9722/attachment.bin


More information about the linux mailing list