class BitstampClient::GenSignature

Public Class Methods

call(key:, secret:, nonce:, customer_id:) click to toggle source
# File lib/bitstamp_client/services/gen_signature.rb, line 4
def self.call(key:, secret:, nonce:, customer_id:)
  digest = OpenSSL::Digest.new('sha256')
  data = nonce.to_s + customer_id + key
  hex = OpenSSL::HMAC.hexdigest(digest, secret, data)
  hex.upcase
end