Trait RNGState

Source
pub trait RNGState {
    // Required methods
    fn randombytes(&mut self, x: &mut [u8]) -> Result<(), Box<dyn Error>>;
    fn randombytes_init(&mut self, entropy_input: [u8; 48]);
}
Expand description

Trait requiring primitives to generate pseudo-random numbers. AesState is an object implementing this trait.

Required Methods§

Source

fn randombytes(&mut self, x: &mut [u8]) -> Result<(), Box<dyn Error>>

Fill the buffer x with pseudo-random bytes resulting from the RNG run updating the RNG state

Source

fn randombytes_init(&mut self, entropy_input: [u8; 48])

Initialize/reset the RNG state based on the seed provided as entropy_input

Implementors§