DeterministicRng

Trait DeterministicRng 

Source
pub trait DeterministicRng {
    // Required methods
    fn fill_bytes(&mut self, out: &mut [u8]) -> Result<(), DrbgError>;
    fn reseed(
        &mut self,
        entropy: &[u8],
        additional_input: Option<&[u8]>,
    ) -> Result<(), DrbgError>;
    fn set_reseed_interval(&mut self, interval: u64);
    fn set_max_bytes_between_reseed(&mut self, bytes: u128);
}
Expand description

Trait implemented by deterministic random bit generators used by Quantum-Sign.

Required Methods§

Source

fn fill_bytes(&mut self, out: &mut [u8]) -> Result<(), DrbgError>

Fill out with pseudorandom bytes.

Source

fn reseed( &mut self, entropy: &[u8], additional_input: Option<&[u8]>, ) -> Result<(), DrbgError>

Reseed the generator with new entropy and optional additional input.

Source

fn set_reseed_interval(&mut self, interval: u64)

Adjust the reseed interval (number of generate calls permitted before mandatory reseed).

Source

fn set_max_bytes_between_reseed(&mut self, bytes: u128)

Adjust the byte budget that forces a reseed.

Implementors§