Sha256: f622e2a252fd2003c714812ac86c6b2ee2fd6f52715e5e87a674e9cb011a477f

Contents?: true

Size: 554 Bytes

Versions: 1

Compression:

Stored size: 554 Bytes

Contents

require 'helper'

def random_string
  generate_salt
end

class TestSalty < Test::Unit::TestCase
  context "test salt" do
    should "basic" do
      salt = generate_salt
      hashed = salty("bob",salt)
    end

    should "hash equality" do
      str = random_string
      salt = generate_salt

      assert_equal salted_hash(str,salt), salted_hash(str,salt)
    end

    should "hash equality method" do
      str = random_string
      salt = generate_salt

      hashed = salted_hash(str,salt)
      assert salty_eq(str,hashed,salt)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
salty-0.0.3 test/test_salty.rb