pub fn randomSecure(io: Io, buffer: []u8) RandomSecureError!void
Obtains cryptographically secure entropy from outside the process.
Always makes a syscall, or otherwise avoids dependency on process memory, in order to obtain fresh randomness. Does not rely on stored RNG state.
Does not have any fallback mechanisms; returns error.EntropyUnavailable if any problems occur.
error.EntropyUnavailable
Threadsafe.
See also random.
random
io: Io
buffer: []u8
2679 2680 2681
pub fn randomSecure(io: Io, buffer: []u8) RandomSecureError!void { return io.vtable.randomSecure(io.userdata, buffer); }
Obtains cryptographically secure entropy from outside the process.
Always makes a syscall, or otherwise avoids dependency on process memory, in order to obtain fresh randomness. Does not rely on stored RNG state.
Does not have any fallback mechanisms; returns
error.EntropyUnavailableif any problems occur.Threadsafe.
See also
random.