Sha256: a75c68ca418fc91c2272f5af24f978fb8567b6fcac7cee2d1fef01af91e6c97c
Contents?: true
Size: 414 Bytes
Versions: 4
Compression:
Stored size: 414 Bytes
Contents
require 'spec_helper' describe ROTP::HOTP do before(:all) { @now = Time.utc(2012,1,1).to_i / 30 } subject { ROTP::HOTP.new('a' * 32) } it "should generate a number given a time" do subject.at(@now).should == 160864 end it "should verify a number" do subject.verify(160864, @now).should be_true end it "should verify a string" do subject.verify("160864", @now).should be_true end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rotp-1.4.2 | spec/hotp_spec.rb |
rotp-1.4.1 | spec/hotp_spec.rb |
rotp-1.4.0 | spec/hotp_spec.rb |
rotp-1.3.3 | spec/hotp_spec.rb |