Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jul 2001 10:24:55 -0400
From:      Mike Tancsa <mike@sentex.net>
To:        HIRATA Yasuyuki <yasu@asuka.net>
Cc:        stable@FreeBSD.ORG
Subject:   Re: Generating encrypted passwords
Message-ID:  <5.1.0.14.0.20010710102259.04255440@marble.sentex.ca>
In-Reply-To: <20010710220142V.yasu@asuka.net>
References:  <4.2.2.20010710081901.05a68008@192.168.0.12> <200107100306.NAA21657@lightning.itga.com.au> <Pine.BSF.4.21.0107100336560.1040-100000@veager.siteplus.ne t> <4.2.2.20010710081901.05a68008@192.168.0.12>

next in thread | previous in thread | raw e-mail | index | archive | help
At 10:01 PM 7/10/01 +0900, HIRATA Yasuyuki wrote:
> > What about a
> > srand (time ^ $$ ^ unpack "%L*", `ps -auxw | gzip`);
> >
> > at the start of your program
>
>If you use perl 5.005 or later, it's better to call srand without seed
>or not to call srand at all.  See perldoc -f srand for detail.

Hi,
but the same perldoc says,

....
Note that you need something much more random than the default seed for
cryptographic purposes.  Checksumming the compressed output of one or more
rapidly changing operating system status programs is the usual method.  For
example:

     srand (time ^ $$ ^ unpack "%L*", `ps axww | gzip`);


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.1.0.14.0.20010710102259.04255440>