From f6abc362fd4eeb990bd311c026b5835b748606b9 Mon Sep 17 00:00:00 2001 From: lithromantic <223941@whut.edu.cn> Date: Sun, 18 Jan 2026 00:04:00 +0100 Subject: [PATCH] Add sha256salt hashing option in password verification --- app/Utils/Helper.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Utils/Helper.php b/app/Utils/Helper.php index e3a3416..f75813b 100644 --- a/app/Utils/Helper.php +++ b/app/Utils/Helper.php @@ -86,6 +86,7 @@ class Helper case 'md5': return md5($password) === $hash; case 'sha256': return hash('sha256', $password) === $hash; case 'md5salt': return md5($password . $salt) === $hash; + case 'sha256salt': return hash('sha256', $password . $salt) === $hash; default: return password_verify($password, $hash); } }