A helper function to compute a signature using an hmac object.
function computeSignature(values, signatureScheme, signatureKey) {
  var hmac = crypto.createHmac(signatureScheme, signatureKey);
  values.forEach(function(v) {
    hmac.update(v);
  });

  return hmac.digest('hex');
}