From 44cc88927612b314c40128827cf6dbff1b74ba16 Mon Sep 17 00:00:00 2001 From: augushong Date: Fri, 6 May 2022 10:12:46 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E5=AF=86=E7=A0=81=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=9B=90=E5=8F=82=E6=95=B0=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/common.php b/app/common.php index 6ed6c12..3d7634f 100644 --- a/app/common.php +++ b/app/common.php @@ -29,9 +29,9 @@ if (!function_exists('password')) { * @param $type 加密类型,默认为md5 (md5, hash) * @return mixed */ - function password($value) + function password($value, $salt = '_encrypt') { - $value = sha1('blog_') . md5($value) . md5('_encrypt') . sha1($value); + $value = sha1('ul_' . $salt) . md5($value) . md5($salt) . sha1($value); return sha1($value); } }