mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-05-08 14:36:13 +00:00
Refactor code and fix linter warnings (#3627)
* refactor: use any instead of empty interface * refactor: code cleanup
This commit is contained in:
@@ -13,6 +13,5 @@ func HashPasswordAsBcrypt(password string) (string, error) {
|
||||
|
||||
// CheckPasswordHash verifies if the given password matches the bcrypt hash.
|
||||
func CheckPasswordHash(hash, password string) bool {
|
||||
err := bcrypt.CompareHashAndPassword([]byte(hash), []byte(password))
|
||||
return err == nil
|
||||
return bcrypt.CompareHashAndPassword([]byte(hash), []byte(password)) == nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user