Kryptonita is a Ruby gem that provides a lot of functions for hashing, encrypt and decrypt
Add this line to your application's Gemfile:
gem 'kryptonita'
And then execute:
$ bundle
Or install it yourself as:
$ gem install kryptonita
require 'kryptonita'
puts Kryptonita::Hash.whirlpool("ruby")
# => "95fc6a05b1edd849a202d9cdb1158930cf1e101900357a8816b743520710be2487c890c3bfb2b70f2308f7e8737473a477bb44950516c23e53a2993091faa9d2"
Kryptonita::Hash.md5(str)
Kryptonita::Hash.md5(str, salt: 'mysalt')
Kryptonita::Hash.sha1(str)
Kryptonita::Hash.sha512(str)
Kryptonita::Hash.whirlpool(str)
- Fork it ( https://github.com/AngoDev/kryptonita/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 a new Pull Request