참고: 이 페이지는 아직 한국어로 번역되지 않았습니다. 아래는 영어 원문입니다.
function randomBytes(length): Uint8Array
Return length bytes of cryptographically secure random data.

Parameters

ParameterTypeDescription
lengthnumberThe number of bytes to generate.

Returns

Uint8Array The random bytes.

Example

randomBytes(8);

Source

crypto/random.ts:29