random_bytes
pub fn random_bytes(buf: ref void, len: usize) voidFill `buf` with `len` cryptographically secure random bytes.
extern (C) fn arc4random_buf(buf: ref void, len: usize) void = trust { ... } = "arc4random_buf"extern (C) fn arc4random_uniform(upper_bound: u32) u32 = trust { ... } = "arc4random_uniform"extern (C) fn BCryptGenRandom(hAlgorithm: ref void, pbBuffer: ref void, cbBuffer: u32, dwFlags: u32) i32 = trust { ... } = "BCryptGenRandom"pub fn random_bytes(buf: ref void, len: usize) voidFill `buf` with `len` cryptographically secure random bytes.
pub fn random_u64() u64Return a cryptographically secure random u64.
pub fn random_u32_below(upper_bound: u32) u32Return a cryptographically secure random u32 in (0, upper_bound) without modulo bias. Requires upper_bound > 0.
pub fn random_uuid() ref u8 = trust { ... }Allocate and return a null-terminated UUID v4 string (37 bytes: 36 chars + null). The caller is responsible for freeing the returned pointer.
Format: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx (RFC 4122)