📜  加密 npm 随机字节 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:52.022000             🧑  作者: Mango

代码示例1
// 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')}`);
});