Trait ParamProvider

Source
pub trait ParamProvider {
    type Params: Clone;

    // Required methods
    fn with_params(params: Self::Params) -> Self;
    fn params(&self) -> &Self::Params;
    fn set_params(&mut self, params: Self::Params);
}
Expand description

Trait for algorithms with configurable parameters

Required Associated Types§

Source

type Params: Clone

The parameter type associated with this algorithm

Required Methods§

Source

fn with_params(params: Self::Params) -> Self

Creates a new instance with the specified parameters

Source

fn params(&self) -> &Self::Params

Returns the current parameters

Source

fn set_params(&mut self, params: Self::Params)

Updates the 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.

Implementors§

Source§

impl<H: HashFunction + Clone, const S: usize> ParamProvider for Pbkdf2<H, S>

Source§

impl<H: HashFunction, const S: usize> ParamProvider for Hkdf<H, S>
where Salt<S>: HkdfCompatible,

Source§

impl<const S: usize> ParamProvider for Argon2<S>
where Salt<S>: Argon2Compatible, Params<S>: Default + Clone + Zeroize + Send + Sync + 'static,