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