crypto.getRandomValues(typedArray)
typedArray<Buffer> | <TypedArray>- 返回:<Buffer> | <TypedArray>
生成加密强度的随机值。给定的 typedArray 会被填充随机值,并返回对 typedArray 的引用。
🌐 Generates cryptographically strong random values. The given typedArray is
filled with random values, and a reference to typedArray is returned.
所提供的 typedArray 必须是基于整数的 <TypedArray> 实例,即不接受 Float32Array 和 Float64Array。
🌐 The given typedArray must be an integer-based instance of <TypedArray>,
i.e. Float32Array and Float64Array are not accepted.
如果给定的 typedArray 大于 65,536 字节,将会抛出错误。
🌐 An error will be thrown if the given typedArray is larger than 65,536 bytes.