def validateHotpKey(self, secretKey, movingFactor, totpKey): digits = self.hotpConfiguration["digits"] htopValidationResult = HOTPValidator.lookAheadWindow(1).validate(secretKey, movingFactor, digits, totpKey) if htopValidationResult.isValid(): return { "result": True, "movingFactor": htopValidationResult.getNewMovingFactor() } return { "result": False, "movingFactor": None }