浏览代码

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

tags/6.0.0
llgoer 6 年前
父节点
当前提交
22e5fd9a44
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. +6
    -5
      src/include/common.func.php

+ 6
- 5
src/include/common.func.php 查看文件

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

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

if (function_exists('random_bytes')) if (function_exists('random_bytes'))
{ {
try 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; return FALSE;
} }




正在加载...
取消
保存