diff --git a/lib/utils.js b/lib/utils.js index 8201220..7435410 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -22,13 +22,9 @@ var utils = module.exports = { return shaSum.digest('base64'); }, generateHashV2: function (apiKey, separator, uri, randomString, secretKey, body) { - var payload = randomString + uri; - if (Object.keys(body).length > 0) { - payload += JSON.stringify(body) - } var signature = crypto .createHmac('sha256', secretKey) - .update(payload) + .update(randomString + uri + JSON.stringify(body)) .digest('hex'); var authorizationParams = [