class TwoFactor extends UnsaltedMethod {

    @Override
    public boolean comparePassword(String password, HashedPassword hashedPassword, String name) {
        try {
            return checkPassword(hashedPassword.getHash(), password);
        } catch (Exception e) {
            ConsoleLogger.logException("Failed to verify two auth code:", e);
            return false;
        }
    }

}