I`m writting sinatra app and i would like to setup encryption in Warden
like i did it in devise when i used Rails.
module Devise
module Encryptors
class Md5 < Base
def self.digest(password, stretches, salt, pepper)
str = [password].flatten.compact.join
Digest::MD5.hexdigest(Digest::MD5.hexdigest(str))
end
end
end
end
Where I can setup this module ??
How to set Warden to use MD5 encryption?
Or how to migrate from MD5 to Bcrypt?