lib/otp/base.rb in otp-0.0.10 vs lib/otp/base.rb in otp-0.0.11
- old
+ new
@@ -40,10 +40,10 @@
def verify(given_pw, last:0, post:0)
raise ArgumentError, "last must be greater than or equal to 0" if last < 0
raise ArgumentError, "post must be greater than or equal to 0" if post < 0
return false if given_pw.nil? || given_pw.empty?
- return (-last..post).any?{|i| compare(password(i), given_pw) }
+ return (-last..post).any?{|i| otp_compare(password(i), given_pw) }
end
def to_uri
return OTP::URI.format(self)
end