pub trait KeyGenerator {
type Key;
// Required methods
fn generate<R: SecureRandom>(&self, rng: &mut R) -> Result<Self::Key>;
fn generate_with_params<R: SecureRandom>(
&self,
rng: &mut R,
params: KeyGenParams,
) -> Result<Self::Key>;
}Expand description
Trait for key generation
Required Associated Types§
Required Methods§
Sourcefn generate_with_params<R: SecureRandom>(
&self,
rng: &mut R,
params: KeyGenParams,
) -> Result<Self::Key>
fn generate_with_params<R: SecureRandom>( &self, rng: &mut R, params: KeyGenParams, ) -> Result<Self::Key>
Generate a new key with specific parameters
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.