Answers for "crypto npm random bytes"

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

Browse Popular Code Answers by Language