Sha256: 955fa7df166c17dd125f8e0a5e38f7ebfb44e6409640b2a498591d6f1cdb2bd4

Contents?: true

Size: 568 Bytes

Versions: 4

Compression:

Stored size: 568 Bytes

Contents

module CryptKeeper
  module Helper
    module SQL
      private

      # Private: Sanitize an sql query and then execute it
      def escape_and_execute_sql(query)
        query = ::ActiveRecord::Base.send :sanitize_sql_array, query
        ::ActiveRecord::Base.connection.execute(query).first
      end
    end

    module DigestPassphrase
      def digest_passphrase(key, salt)
        raise ArgumentError.new("Missing :key") if key.blank?
        raise ArgumentError.new("Missing :salt") if salt.blank?
        ::Armor.digest(key, salt)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
crypt_keeper-1.1.0 lib/crypt_keeper/helper.rb
crypt_keeper-1.0.1 lib/crypt_keeper/helper.rb
crypt_keeper-1.0.0 lib/crypt_keeper/helper.rb
crypt_keeper-1.0.0.beta1 lib/crypt_keeper/helper.rb