We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc853a1 commit 21ad8ecCopy full SHA for 21ad8ec
README.md
@@ -389,10 +389,10 @@ const secret = "yourSecret";
389
const t = Date.now();
390
const nonce = "requestID";
391
const data = token + t + nonce;
392
-const signTerm = crypto.createHmac('sha256', secret)
393
- .update(Buffer.from(data, 'utf-8'))
394
- .digest();
395
-const sign = signTerm.toString("base64");
+const sign = crypto
+ .createHmac('sha256', secret)
+ .update(data)
+ .digest('base64');
396
console.log(sign);
397
398
const body = JSON.stringify({
0 commit comments