Re: [PHP-DEV] Re: Seeding rand() at process start?

2001-09-22 Thread mlwmohawk
srand(); As of the CVS version of PHP, if you leave the seed out, the rand implementation will autogenerate it for you (it really wasn't that hard beforehand, but...) I'm currently debating whether seeding at startup is a good idea, because alot of scripts don't

Re: [PHP-DEV] Re: Seeding rand() at process start?

2001-09-22 Thread Rick Bradley
* Tony Reed ([EMAIL PROTECTED]) [010921 10:26]: :On UNIX we could seed rand() with /dev/urandom, else we could use time of :day. (Any other suggestions would be welcome.) http://www.fourmilab.ch/hotbits/ You can pick up as many random bytes as you want; usually use a 16-bit INT as a

Re: [PHP-DEV] Re: Seeding rand() at process start?

2001-09-21 Thread mlwmohawk
That's not the point. If PHP seeds the random number generator at MINIT time, with a pretty good random seed it will save a lot of work for devlopers tying to use rand() to come up with a good random number. As it is now, they need some sort of flag that indicates that they have seeded the

Re: [PHP-DEV] Re: Seeding rand() at process start?

2001-09-21 Thread Sterling Hughes
On Fri, 21 Sep 2001 [EMAIL PROTECTED] wrote: That's not the point. If PHP seeds the random number generator at MINIT time, with a pretty good random seed it will save a lot of work for devlopers tying to use rand() to come up with a good random number. As it is now, they need some sort of