note 108478 deleted from function.rand by danbrown
| From: | danbrown@php.net | Date: | Thu, 10 May 2012 16:55:33 +0000 |
| Subject: | note 108478 deleted from function.rand by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-187611@lists.php.net to get a copy of this message | ||
Note Submitter: hans at llis dot nl
----
As Alex Khimch wrote earlier: the distribution of this function might be very biased. Therefore, do
NOT use this function to generate cryptographic keys or IV's unless you know exactly what
you're doing.
The example script that Alex posted shows in a very neat way how predictable the output of the
rand()-function is on your system. On my windows 7 system I got really neat patterns, but though
that might be nice as a wallpaper of sorts, it's not what I'm using a random function for
:)