use new random number function

This commit is contained in:
Roland Gruber 2013-07-21 11:47:49 +00:00
parent 87956b95fe
commit 8cc198ab34
1 changed files with 3 additions and 0 deletions

View File

@ -992,6 +992,9 @@ class moduleCache {
* @return int random number
*/
function getRandomNumber() {
if (function_exists('openssl_random_pseudo_bytes')) {
return hexdec(bin2hex(openssl_random_pseudo_bytes(5)));
}
return mt_rand();
}