class Wayforpay::EncryptField
Attributes
attrs[R]
keys[R]
Public Class Methods
call(keys, attrs = {})
click to toggle source
# File lib/wayforpay/encrypt_field.rb, line 11 def self.call(keys, attrs = {}) new(keys, attrs).call end
new(keys, attrs)
click to toggle source
# File lib/wayforpay/encrypt_field.rb, line 7 def initialize(keys, attrs) @keys, @attrs = keys, attrs end
Public Instance Methods
call()
click to toggle source
# File lib/wayforpay/encrypt_field.rb, line 15 def call OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('md5'), Wayforpay.encrypt_secret_key, signature_string) end
signature_string()
click to toggle source
# File lib/wayforpay/encrypt_field.rb, line 19 def signature_string attrs.values_at(*keys).compact.join(';') end