Answers for "how to crypto make a random bytes in node js"

C++
0

crypto npm random bytes

// Asynchronous
const crypto = require('crypto');
crypto.randomBytes(256, (err, buf) => {
  if (err) throw err;
  console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`);
});
Posted by: Guest on August-26-2020

Code answers related to "how to crypto make a random bytes in node js"

Browse Popular Code Answers by Language