pub trait AlgorithmFactory: Sized + Default {
// Required methods
fn default_128_bit() -> Self;
fn default_256_bit() -> Self;
fn new(alg_name: &str) -> Result<Self, FactoryError>;
}Required Methods§
Sourcefn default_128_bit() -> Self
fn default_128_bit() -> Self
Get the default configured algorithm at the 128-bit security level.
Sourcefn default_256_bit() -> Self
fn default_256_bit() -> Self
Get the default configured algorithm at the 256-bit security level.
Sourcefn new(alg_name: &str) -> Result<Self, FactoryError>
fn new(alg_name: &str) -> Result<Self, FactoryError>
Create an instance of the algorithm by name.
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.