3 ms·
I certainly wasn't trying to debate the value of mt_rand or it's implementation of the Mersenne Twister. I was simply trying to point out this is an extremely o
by ktsmith 16y ago
I certainly wasn't trying to debate the value of mt_rand or it's implementation of the Mersenne Twister. I was simply trying to point out this is an extremely old issue, and that the problem specified in the article (a visible problem with rand()) is removed by using mt_rand(). Also, the issue only occurs due to problems with the PRNG on Windows specifically and was not present on other operating systems. The use of php's rand() or mt_rand() for applications that require security seems to be outside the scope of the article as it was presented since the author didn't necessarily understand the topic as can be seen by his proposed solutions.
- tptacek 16y agoYou managed to point out how extremely old this issue was in a manner that implied that mt_rand() was safe for use for security. Since this is an extremely, extremely common problem in PHP code, your comment did more harm than good.
- ktsmith 16y agoSince you feel it was so harmful I've removed it.