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.5.2 | lib/braintree/digest.rb |
braintree-2.5.1 | lib/braintree/digest.rb |