Skip to content

Commit

Permalink
Update Javascript example
Browse files Browse the repository at this point in the history
  • Loading branch information
donavanbecker authored Dec 22, 2024
1 parent cc853a1 commit 21ad8ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,10 @@ const secret = "yourSecret";
const t = Date.now();
const nonce = "requestID";
const data = token + t + nonce;
const signTerm = crypto.createHmac('sha256', secret)
.update(Buffer.from(data, 'utf-8'))
.digest();
const sign = signTerm.toString("base64");
const sign = crypto
.createHmac('sha256', secret)
.update(data)
.digest('base64');
console.log(sign);

const body = JSON.stringify({
Expand Down

0 comments on commit 21ad8ec

Please sign in to comment.