Sha256: b114e1e3e1fed9979ee8dd62d9379863526ad1a97f96fb14813cade0103287aa
Contents?: true
Size: 351 Bytes
Versions: 10
Compression:
Stored size: 351 Bytes
Contents
module Braintree module SHA256Digest # :nodoc: def self.hexdigest(private_key, string) _hmac(private_key, string) end def self._hmac(key, message) key_digest = ::Digest::SHA256.digest(key) sha256 = OpenSSL::Digest::Digest.new("sha256") OpenSSL::HMAC.hexdigest(sha256, key_digest, message.to_s) end end end
Version data entries
10 entries across 10 versions & 1 rubygems