获取密码学安全的随机数。
要生成的随机字节数。
包含随机数据的 Uint8Array,封装在 IOResult 中。
const result = await getRandomValues(16);if (result.isOk()) { console.log(result.unwrap()); // Uint8Array(16) [...]} Copy
const result = await getRandomValues(16);if (result.isOk()) { console.log(result.unwrap()); // Uint8Array(16) [...]}
获取密码学安全的随机数。