Sha256: dc2cd6a2190929098f4d7e2eda9120ed7e2deb730a6f67c7f20ccf547a843a1a
Contents?: true
Size: 376 Bytes
Versions: 3
Compression:
Stored size: 376 Bytes
Contents
require 'spec_helper' describe "HMAC" do it "should hopefully work" do Gibberish::HMAC("password", "data").must_equal("08d13c72bed7ace5efadc09df109a78a5d713097") end it "should work with OpenSSL HMAC" do hmac = Gibberish::HMAC("password", "data\n") o_hmac = `echo "data" | openssl dgst -sha1 -hmac 'password'` hmac.must_equal(o_hmac.chomp) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
gibberish-1.1.0 | spec/hmac_spec.rb |
gibberish-1.0.2 | spec/hmac_spec.rb |
gibberish-1.0.1 | spec/hmac_spec.rb |