📅  最后修改于: 2022-03-11 14:44:52.022000             🧑  作者: Mango
// 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')}`);
});