Cryptographically secure PRNG backed by crypto.getRandomValues.
OptionalbytesLength: numbernumber of random bytes to generate
Random bytes.
The platform getRandomValues() implementation still defines any
single-call length cap, and this helper rejects oversize requests
with a stable library RangeError instead of host-specific errors.
Generate
lengthcryptographically secure random bytes.Param: length
Number of random bytes to generate.
Returns
A
Uint8Arrayof random bytes.