Sha256: 227177292ef345dd8ef234620a0e2af71ba781e1e33c250f7bf66b31f82c1f17
Contents?: true
Size: 454 Bytes
Versions: 8
Compression:
Stored size: 454 Bytes
Contents
require 'openssl' module Wayforpay class EncryptField attr_reader :keys, :attrs def initialize(keys, attrs) @keys, @attrs = keys, attrs end def self.call(keys, attrs = {}) new(keys, attrs).call end def call OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('md5'), Wayforpay.encrypt_secret_key, signature_string) end def signature_string attrs.values_at(*keys).compact.join(';') end end end
Version data entries
8 entries across 8 versions & 1 rubygems