给密码函数增加盐参数;

This commit is contained in:
2022-05-06 10:12:46 +08:00
parent 553c1d5704
commit 44cc889276

View File

@@ -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);
}
}