From 22e5fd9a44125ee22c6f4adc5cd07d3336a42efb Mon Sep 17 00:00:00 2001 From: llgoer Date: Tue, 3 Sep 2019 10:30:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=83=A8=E5=88=86linux?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E4=B8=8B=E7=94=9F=E6=88=90=E9=9A=8F=E6=9C=BA?= =?UTF-8?q?bytes=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/include/common.func.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/include/common.func.php b/src/include/common.func.php index f176281..9ce1a1e 100755 --- a/src/include/common.func.php +++ b/src/include/common.func.php @@ -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; }