Sha256: f68a68c956182094c92f982b19877d2dbfa0dc4dfc4e35aeeb76bf65b94fdc58
Contents?: true
Size: 506 Bytes
Versions: 3
Compression:
Stored size: 506 Bytes
Contents
require 'helper' def random_string generate_salt end class TestSalty < Test::Unit::TestCase context "test salt" do should "hash equality" do 10.times do str = random_string hashed = salty(str) assert salty_eq(str,hashed) end end should "hash inequaliy" do 10.times do str = random_string hashed = salty(str) other = random_string assert(other == str || (not salty_eq(other,hashed))) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
salty-0.0.6 | test/test_salty.rb |
salty-0.0.5 | test/test_salty.rb |
salty-0.0.4 | test/test_salty.rb |