Sha256: 24bfc492c0a45ee891fea6060f374d1206edce706be1222691b1b9f2d0c6e83e
Contents?: true
Size: 333 Bytes
Versions: 8
Compression:
Stored size: 333 Bytes
Contents
module Braintree module SHA256Digest 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.new("sha256") OpenSSL::HMAC.hexdigest(sha256, key_digest, message.to_s) end end end
Version data entries
8 entries across 8 versions & 1 rubygems