[Chore] 📌 Use CreateTime Instead of Email as Salt

This commit is contained in:
Harry-zklcdc 2025-02-08 02:22:50 +08:00
parent 00d2539cbb
commit 2df88d1159

View File

@ -24,7 +24,7 @@ type Users struct {
}
func (u *Users) PasswordHash(password string) string {
return crypto.Sha256(password + u.Email + config.GetSystemSalt())
return crypto.Sha256(password + u.CreatedAt.GoString() + config.GetSystemSalt())
}
func (u *Users) CheckPassword(password string) bool {