gem install vecrypt
require "vecrypt"
password = VeEncrypt.new('your password')
salt = password.encrypt[:salt] #salt is a key
hash_password = password.encrypt[:password] #password is a key
password_check = VeDecrypt.new('your password', salt , hash_password)
password_check.decrypt # it return true or false