Sha256: f0d6d082ab3b9340fc0cef72e780d63704ebfb96dadbe82cbb00a1496e3c5d86
Contents?: true
Size: 378 Bytes
Versions: 36
Compression:
Stored size: 378 Bytes
Contents
module Billimatic class Signature attr_accessor :secret def initialize(secret) @secret = secret end def check?(billimatic_request_id, signature_to_check, body) billimatic_signature = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha1'), secret, "#{billimatic_request_id}#{body}") signature_to_check == billimatic_signature end end end
Version data entries
36 entries across 36 versions & 1 rubygems