Class: Trocla::Formats::Bcrypt
- Defined in:
- lib/trocla/formats/bcrypt.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
expensive, #expensive?, expensive?, #initialize, #render
Constructor Details
This class inherits a constructor from Trocla::Formats::Base
Instance Method Details
#format(plain_password, options = {}) ⇒ Object
4 5 6 |
# File 'lib/trocla/formats/bcrypt.rb', line 4 def format(plain_password, = {}) BCrypt::Password.create(plain_password, :cost => ['cost'] || BCrypt::Engine.cost).to_s end |