Sha256: bea1b771b43a9b4c07c9d2500f7f62f8d9a51ffe3f9e033177c77896dd5f925f
Contents?: true
Size: 363 Bytes
Versions: 110
Compression:
Stored size: 363 Bytes
Contents
module Braintree class SignatureService attr_reader :key def initialize(key, digest=Braintree::Digest) @key = key @digest = digest end def sign(data) query_string = Util.hash_to_query_string(data) "#{hash(query_string)}|#{query_string}" end def hash(data) @digest.hexdigest(@key, data) end end end
Version data entries
110 entries across 110 versions & 1 rubygems