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§
Sourcefn fill_bytes(&mut self, out: &mut [u8]) -> Result<(), DrbgError>
fn fill_bytes(&mut self, out: &mut [u8]) -> Result<(), DrbgError>
Fill out with pseudorandom bytes.
Sourcefn reseed(
&mut self,
entropy: &[u8],
additional_input: Option<&[u8]>,
) -> Result<(), DrbgError>
fn reseed( &mut self, entropy: &[u8], additional_input: Option<&[u8]>, ) -> Result<(), DrbgError>
Reseed the generator with new entropy and optional additional input.
Sourcefn set_reseed_interval(&mut self, interval: u64)
fn set_reseed_interval(&mut self, interval: u64)
Adjust the reseed interval (number of generate calls permitted before mandatory reseed).
Sourcefn set_max_bytes_between_reseed(&mut self, bytes: u128)
fn set_max_bytes_between_reseed(&mut self, bytes: u128)
Adjust the byte budget that forces a reseed.