Ssha
This module create SSHA hash and check password
Installation
Add this line to your application's Gemfile:
gem 'ssha'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ssha
Usage
SSHA.hash_password('password')
or
SSHA.hash_password('password', 'you salt')
Check password:
if SSHA.check_password('password','you hash')
puts "password OK"
else
puts "Wrong password"
end
Example
> SSHA.hash_password('test')
=> "*4e48d0e9c221f4b5*{SSHA}awu0CUj+cApR53Hw2KQAh5grsX40ZTQ4ZDBlOWMyMjFmNGI1"
Contributing
- Fork it ( http://github.com/nightweb/ssha/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request