Returns the next random 32-bit unsigned integer.
Returns the next random 64-bit unsigned integer as a bigint.
Fills the given Uint8Array with random bytes.
Returns a Uint8Array of random bytes of the given size.
Fills the given Uint8Array with random bytes. Alias for fillBytes for compatibility.
Interface for random number generators. This is the TypeScript equivalent of Rust's RandomNumberGenerator trait which extends RngCore + CryptoRng.
This is compatible with the RandomNumberGenerator Swift protocol used in MacOS and iOS, which is important for cross-platform testing.