lib/rotp/hotp.rb
# Verifies the OTP passed in against the current time OTP
# @param otp [String/Integer] the OTP to check against
# @param counter [Integer] the counter of the OTP
# @param retries [Integer] number of counters to incrementally retry
Verifies the OTP passed in against the current time OTP
Verifies the OTP passed in against the current time OTP
def verify(otp, counter, retries: 0)
      counters = (counter..counter + retries).to_a
      counters.find do |c|
        super(otp, at(c))
      end
    end
def verify ( otp , counter , retries : 0 ) counters = ( counter .. counter + retries ) . to_a counters . find do | c | super ( otp , at ( c ) ) end end
Verifies the OTP passed in against the current time OTP
Verifies the OTP passed in against the current time OTP
otp
the OTP to check against
the OTP to check against
counter
the counter of the OTP
the counter of the OTP
retries
number of counters to incrementally retry
number of counters to incrementally retry