Parcourir la source

修正部分linux环境下生成随机bytes错误

tags/6.0.0
llgoer il y a 4 ans
Parent
révision
22e5fd9a44
1 fichiers modifiés avec 6 ajouts et 5 suppressions
  1. +6
    -5
      src/include/common.func.php

+ 6
- 5
src/include/common.func.php Voir le fichier

@@ -67,6 +67,12 @@ function dede_random_bytes($length)
{
return FALSE;
}

if (function_exists('openssl_random_pseudo_bytes'))
{
return openssl_random_pseudo_bytes($length);
}

if (function_exists('random_bytes'))
{
try
@@ -93,11 +99,6 @@ function dede_random_bytes($length)
}
}

if (function_exists('openssl_random_pseudo_bytes'))
{
return openssl_random_pseudo_bytes($length);
}

return FALSE;
}



Chargement…
Annuler
Enregistrer