🎨 update models

This commit is contained in:
landaiqing
2024-08-09 22:02:44 +08:00
parent 331835f949
commit 6148fc74c6
16 changed files with 202 additions and 38 deletions

View File

@@ -13,7 +13,7 @@ func Encrypt(val string) (string, error) {
}
// Verify 验证
func Verify(hashedVal, val string) bool {
func Verify(hashedVal string, val string) bool {
// 使用bcrypt库的CompareHashAndPassword函数比较密码
err := bcrypt.CompareHashAndPassword([]byte(hashedVal), []byte(val))
return err == nil