OTPHP\HOTP::verify PHP Метод

verify() публичный Метод

public verify ( $otp, $counter = null, $window = null )
    public function verify($otp, $counter = null, $window = null)
    {
        Assertion::string($otp, 'The OTP must be a string');
        Assertion::nullOrInteger($counter, 'The counter must be null or an integer');
        Assertion::greaterOrEqualThan($counter, 0, 'The counter must be at least 0.');
        Assertion::nullOrInteger($window, 'The window parameter must be null or an integer');
        if (null === $counter) {
            $counter = $this->getCounter();
        } elseif ($counter < $this->getCounter()) {
            return false;
        }
        return $this->verifyOtpWithWindow($otp, $counter, $window);
    }