nodejs generate random string crypto code example
Example 1: js crpyto generate safe token
const crypto = require('crypto');
const token = crypto.randomBytes(48).toString('hex');
Example 2: randomstring npm
npm install randomstring
const crypto = require('crypto');
const token = crypto.randomBytes(48).toString('hex');
npm install randomstring