Sha256: e3cd924a61b532aec6f8a2144da902cf026b9803f3f9746d1a9d395b46ac05bb

Contents?: true

Size: 348 Bytes

Versions: 22

Compression:

Stored size: 348 Bytes

Contents

module Braintree
  module Digest # :nodoc:
    def self.hexdigest(private_key, string)
      _hmac_sha1(private_key, string)
    end

    def self._hmac_sha1(key, message)
      key_digest = ::Digest::SHA1.digest(key)
      sha1 = OpenSSL::Digest::Digest.new("sha1")
      OpenSSL::HMAC.hexdigest(sha1, key_digest, message.to_s)
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
braintree-2.15.0 lib/braintree/digest.rb
braintree-2.14.0 lib/braintree/digest.rb
braintree-2.13.4 lib/braintree/digest.rb
braintree-2.13.3 lib/braintree/digest.rb
braintree-2.13.2 lib/braintree/digest.rb
braintree-2.13.1 lib/braintree/digest.rb
braintree-2.10.3 lib/braintree/digest.rb
braintree-2.13.0 lib/braintree/digest.rb
braintree-2.12.0 lib/braintree/digest.rb
braintree-2.11.0 lib/braintree/digest.rb
braintree-2.10.2 lib/braintree/digest.rb
braintree-2.10.1 lib/braintree/digest.rb
braintree-2.10.0 lib/braintree/digest.rb
braintree-2.9.1 lib/braintree/digest.rb
braintree-2.8.0 lib/braintree/digest.rb
braintree-2.7.0 lib/braintree/digest.rb
braintree-2.6.3 lib/braintree/digest.rb
braintree-2.6.2 lib/braintree/digest.rb
braintree-2.6.1 lib/braintree/digest.rb
braintree-2.6.0 lib/braintree/digest.rb