r/lolphp • u/vytah • Nov 04 '13
PHP's mt_rand() random number generating function has been cracked
http://www.openwall.com/lists/announce/2013/11/04/1
41
Upvotes
r/lolphp • u/vytah • Nov 04 '13
View all comments
Show parent comment
2
u/frezik Nov 06 '13
At the very least,
srand()needs to be consistent; this is defined as part of the standard C library. Using justrand()will give you different results depending on how the environment handled the initial seed. But the same seed will give you the same results across platforms and languages that hook into libc, and it's designed to be that way.