Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RunKit + npm: uuid
node v14.20.1
endpoint
share
tweet
const crypto = require('crypto'), secretKey = 'RTk2eNs67Vpan3345pmrwYEBYsWXRXtGF3BKTFq8WMLLOLOL', time = Math.round(new Date().getTime() / 1000).toString(), body = { timestamp: time, validity: '2000' }; const signature = crypto.createHmac('sha256',secretKey).update(JSON.stringify(body)).digest('hex')
Created from: https://npm.runkit.com/uuid
Loading…
Clone and edit this document