Sha256: e1658d2cb174f8bffc2fbda319378c6752ac42e0213efdc4bc3cf3178c36d09a
Contents?: true
Size: 363 Bytes
Versions: 55
Compression:
Stored size: 363 Bytes
Contents
module Cobrato class Signature attr_accessor :secret def initialize(secret) @secret = secret end def check?(cobrato_request_id, signature_to_check, body) cobrato_signature = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha1'), secret, "#{cobrato_request_id}#{body}") signature_to_check == cobrato_signature end end end
Version data entries
55 entries across 55 versions & 1 rubygems