README.rdoc in salty-0.0.2 vs README.rdoc in salty-0.0.3

- old
+ new

@@ -1,8 +1,8 @@ = salty -stupid little gem for salted hashing +stupid little gem for salted hashing (for, eg, user passwords) == Installation Just $ gem install salty @@ -11,17 +11,23 @@ If you want, you can also just $ wget https://raw.github.com/alecbenzer/salty/master/lib/salty.rb -and get the file locally. It's less than 300 bytes. +and get the file locally. It's less than 1KB. == Usage require 'salty' # you may need to do './salty' if you used wget - salt = generate_salt # generate a salt - salted_hash("mypassword",salt) # => "edcaa79cf4f507cb43995d2e2616530b43236667" + salt = generate_salt + password = salty("mypassword",salt) # iterative salted SHA1 hash + + if salty_eq("mypassword",password,salt) + puts "You're logged in!" + else + puts "Wrong password" + end == Contributing to salty * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet. * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.