pub trait Generator: 'static + Send {
    fn public_random_fill(&mut self, dest: &mut [u8]);
    fn private_random_fill(&mut self, dest: &mut [u8]);
}
Expand description

A generator of random data. The two methods provide the same functionality for different use cases. One for “public” randomly generated data that may appear in the clear, and one for “private” data that should remain secret. This approach lessens the risk of potential predictability weaknesses in random number generation algorithms from leaking information across contexts.

Required Methods

Fills dest with unpredictable bits that may be sent over the wire and viewable in the clear.

Fills dest with unpredictable bits that will only be used internally within the endpoint, remaining secret.

Implementors