Initializing Perl's rand

Sam Couter scouter at
Tue Jun 25 12:09:26 EST 2002

Doug.Palmer at <Doug.Palmer at> 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
Debian Developer    |  mailto:eddie at
                    |  jabber:sam at
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 :

More information about the linux mailing list