Re: Use decent entropy for uniqid($prefix, TRUE)
| From: | Lauri Kenttä | Date: | Sun, 08 Jan 2017 17:29:18 +0000 |
| Subject: | Re: Use decent entropy for uniqid($prefix, TRUE) | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-97588@lists.php.net to get a copy of this message | ||
On 2017-01-07 03:15, Yasuo Ohgaki wrote:
No, it shouldn't. That fixes none of the reported problems. You still have too many numbers (integer overflow) and still produce 0.abcdefgh instead of a.bcdefghi. If you can't fix it, maybe you shouldn't be doing it in the first place... -- Lauri Kenttä+ php_random_int(1000000000, 9999999999, &rand, 1);This should be+ php_random_int(0, 9999999999, &rand, 1);