Sha256: 4e9b2c9025961f867580dee201df480edf280ed6e1d41cb3da6de384dc394d9f

Contents?: true

Size: 335 Bytes

Versions: 9

Compression:

Stored size: 335 Bytes

Contents

module Exposition
  class Encryptor
    # Returns the hash digest of the given string.
    def self.encrypt(string)
      cost = ActiveModel::SecurePassword.min_cost ? BCrypt::Engine::MIN_COST :
                                                    BCrypt::Engine.cost
      BCrypt::Password.create(string, cost: cost)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
exposition-0.0.5.7.pre.alpha app/models/exposition/encryptor.rb
exposition-0.0.5.6.pre.alpha app/models/exposition/encryptor.rb
exposition-0.0.5.5.pre.alpha app/models/exposition/encryptor.rb
exposition-0.0.5.4.pre.alpha app/models/exposition/encryptor.rb
exposition-0.0.5.2.pre.alpha app/models/exposition/encryptor.rb
exposition-0.0.5.1.pre.alpha app/models/exposition/encryptor.rb
exposition-0.0.5.pre.alpha app/models/exposition/encryptor.rb
exposition-0.0.4.pre.alpha app/models/exposition/encryptor.rb
exposition-0.0.3.pre.alpha app/models/exposition/encryptor.rb