Does it make sense for PHP to seed rand() with srand() when it starts up,
during MINIT in basic_functions.c?

It just seems that there is no good way to ensure you have a good seed for
random, and if rand() were "ready to use, out of the box" a lot of people
would not be pulling their hair out trying to fabricate a clean seed.
Besides one should seed only once, more often than that circumvents the
"randomness" of a random number generator.

On UNIX we could seed rand() with /dev/urandom, else we could use time of
day. (Any other suggestions would be welcome.)



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to