func (PasswordHandler) IsCorrect(hashedPassword []byte, password string) (bool, error) {
	err := bcrypt.CompareHashAndPassword(hashedPassword, []byte(password))
	switch {
	case err == bcrypt.ErrMismatchedHashAndPassword:
		return false, nil
	case err != nil:
		return false, err
	}
	return true, nil
}
// IsCorrect determines if the hashed password matches the supplied password
IsCorrect determines if the hashed password matches the supplied password
// IsCorrect determines if the hashed password matches the supplied password
func (PasswordHandler) IsCorrect(hashedPassword []byte, password string) (bool, error) {
	err := bcrypt.CompareHashAndPassword(hashedPassword, []byte(password))
	switch {
	case err == bcrypt.ErrMismatchedHashAndPassword:
		return false, nil
	case err != nil:
		return false, err
	}
	return true, nil
}
func ( PasswordHandler ) IsCorrect ( hashedPassword [ ] byte , password string ) ( bool , error ) { err := bcrypt . CompareHashAndPassword ( hashedPassword , [ ] byte ( password ) ) switch { case err == bcrypt . ErrMismatchedHashAndPassword : return false , nil case err != nil : return false , err } return true , nil }
IsCorrect determines if the hashed password matches the supplied password
IsCorrect determines if the hashed password matches the supplied password