System
The System source of randomness uses whatever secure randomness generator
is available on the platform that Passgen is compiled. For UNIX-based systems,
this can often be /dev/urandom
, or a syscall such as getrandom()
or
getentropy()
.
System randomness source just uses the rand::thread_rng()
method to return
the current thread-local random number generator.
#![allow(unused)] fn main() { impl RandomSource for System { type Rng = rand::rngs::ThreadRng; fn get_rng(&self, _index: usize) -> Self::Rng { rand::thread_rng() } } }
You can find data on the source of randomness used in the
getrandom, which is used to
implement ThreadRng
.