Sha256: 44981e410cd27a2d4ad904ce0245f596ffec1cc4421386100d24ef22f783f630

Contents?: true

Size: 398 Bytes

Versions: 6

Compression:

Stored size: 398 Bytes

Contents

module ApiAuth
  module Helpers # :nodoc:
    def b64_encode(string)
      Base64.strict_encode64(string)
    end

    def md5_base64digest(string)
      Digest::MD5.base64digest(string)
    end

    # Capitalizes the keys of a hash
    def capitalize_keys(hsh)
      capitalized_hash = {}
      hsh.each_pair { |k, v| capitalized_hash[k.to_s.upcase] = v }
      capitalized_hash
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
api-auth-2.4.1 lib/api_auth/helpers.rb
api-auth-2.4.0 lib/api_auth/helpers.rb
api-auth-2.3.1 lib/api_auth/helpers.rb
api-auth-2.3.0 lib/api_auth/helpers.rb
api-auth-2.2.1 lib/api_auth/helpers.rb
api-auth-2.2.0 lib/api_auth/helpers.rb