Provides access to the system's cryptographically secure pseudo-random number generator (CSPRNG).

Static methods

staticgetBytes(length:Int):Bytes

Generates a specified number of cryptographically secure random bytes.

Parameters:

length

The number of bytes to generate.

Returns:

A Bytes object containing the random data, or null on failure.

staticuuid():String

Generates a version 4 UUID (RFC 4122) using system entropy.

Returns:

A UUID string.