1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-11-26 20:24:39 +01:00

BigInteger: "be less overly clever loading Crypt/Random"

pretty much the same as this commit:

28f18f83ec
This commit is contained in:
terrafrost 2014-05-29 16:31:26 -05:00
parent 30de331eb4
commit 7c08ab71d3

View File

@ -3066,8 +3066,7 @@ class Math_BigInteger
*/
function _random_number_helper($size)
{
$crypt_random = function_exists('crypt_random_string') || (!class_exists('Crypt_Random') && function_exists('crypt_random_string'));
if ($crypt_random) {
if (function_exists('crypt_random_string')) {
$random = crypt_random_string($size);
} else {
$random = '';