Class: Cybersourcery::CybersourceSigner::Signer

Inherits:
Object
  • Object
show all
Defined in:
lib/cybersourcery/cybersource_signer.rb

Class Method Summary collapse

Class Method Details

.signature(message, secret_key) ⇒ Object



72
73
74
75
76
# File 'lib/cybersourcery/cybersource_signer.rb', line 72

def self.signature(message, secret_key)
  mac = HMAC::SHA256.new(secret_key)
  mac.update message
  Base64.strict_encode64(mac.digest)
end