Skip to main content

AlgorithmFactory

Trait AlgorithmFactory 

Source
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§

Source

fn default_128_bit() -> Self

Get the default configured algorithm at the 128-bit security level.

Source

fn default_256_bit() -> Self

Get the default configured algorithm at the 256-bit security level.

Source

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".

Implementors§