From e3e2ab65a93665795786590af50f8780c5bdffe7 Mon Sep 17 00:00:00 2001 From: zhaoxiang <756958008@qq.com> Date: Mon, 24 Apr 2017 17:47:44 +0800 Subject: [PATCH] =?UTF-8?q?added=20=E8=B0=83=E6=95=B4=E5=85=AC=E5=85=B1?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/function.php | 14 -------------- Application/Common/Common/function.php | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php index e3caa14..bb7f217 100644 --- a/Application/Admin/Common/function.php +++ b/Application/Admin/Common/function.php @@ -1,18 +1,4 @@ - */ -function user_md5($str, $auth_key = ''){ - if(!$auth_key){ - $auth_key = C('AUTH_KEY'); - } - return '' === $str ? '' : md5(sha1($str) . $auth_key); -} - /** * 判断是否是系统管理员 * @param mixed $uid diff --git a/Application/Common/Common/function.php b/Application/Common/Common/function.php index ea9ad97..9413382 100644 --- a/Application/Common/Common/function.php +++ b/Application/Common/Common/function.php @@ -24,6 +24,20 @@ if (!function_exists('apache_request_headers')) { } } +/** + * 系统非常规MD5加密方法 + * @param string $str 要加密的字符串 + * @param string $auth_key 要加密的字符串 + * @return string + * @author jry <598821125@qq.com> + */ +function user_md5($str, $auth_key = ''){ + if(!$auth_key){ + $auth_key = C('AUTH_KEY'); + } + return '' === $str ? '' : md5(sha1($str) . $auth_key); +} + /** * @param $url * @param int $timeOut