Merge pull request #464 from eeeeLeeee/patch-4

sha256 + argon2
master
CGDF 8 years ago committed by GitHub
commit 3a9505c5c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -44,7 +44,8 @@ class Hash
public static function argon2iWithSalt($pwd)
{
$salt = Config::get('salt');
return password_hash($pwd.$salt, PASSWORD_ARGON2I);
return hash('sha256',password_hash($pwd.$salt, PASSWORD_ARGON2I));
//由于直接Argon2字符超过64位数据库装不下,懒得去改数据库了,所有再套一层sha256在外面缩短下长度
}
// @TODO
public static function checkPassword($hashedPassword, $password)

Loading…
Cancel
Save