def signature(timestamp, nonce, verb, uri)
      signature = [
        timestamp,
        nonce,
        verb.to_s.upcase,
        uri.request_uri,
        uri.host,
        uri.port,
        '', nil
      ].join("\n")

      Base64.strict_encode64(OpenSSL::HMAC.digest(@algorithm, secret, signature))
    end
def signature(timestamp, nonce, verb, uri)
      signature = [
        timestamp,
        nonce,
        verb.to_s.upcase,
        uri.request_uri,
        uri.host,
        uri.port,
        '', nil
      ].join("\n")

      Base64.strict_encode64(OpenSSL::HMAC.digest(@algorithm, secret, signature))
    end
Generate the Base64-encoded HMAC digest signature

 @param [Fixnum] timestamp the timestamp of the request in seconds since epoch
 @param [String] nonce the MAC header nonce
 @param [Symbol] verb the HTTP request method
 @param [String] url the HTTP URL path of the request