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