Struct TypedPbkdf2

Source
pub struct TypedPbkdf2<H: HashFunction + Clone> { /* private fields */ }
Expand description

Enhanced PBKDF2 implementation with type-level guarantees

Trait Implementations§

Source§

impl<H: HashFunction + Clone> KeyDerivationFunction for TypedPbkdf2<H>

Source§

type Algorithm = Pbkdf2Algorithm<H>

The algorithm this KDF implements
Source§

type Salt = Salt<16>

Salt type with appropriate validation
Source§

fn new() -> Self

Creates a new instance of the KDF with default parameters
Source§

fn derive_key( &self, input: &[u8], salt: Option<&[u8]>, info: Option<&[u8]>, length: usize, ) -> Result<Vec<u8>>

Derives a key using the KDF parameters Read more
Source§

fn builder(&self) -> impl KdfOperation<'_, Self::Algorithm>

Creates a builder for fluent API usage - FIXED: Elided lifetime
Source§

fn generate_salt<R: RngCore + CryptoRng>(rng: &mut R) -> Self::Salt

Generate a random salt with appropriate size
Source§

fn security_level() -> SecurityLevel

Returns the security level of the KDF in bits

Auto Trait Implementations§

§

impl<H> Freeze for TypedPbkdf2<H>

§

impl<H> RefUnwindSafe for TypedPbkdf2<H>
where H: RefUnwindSafe,

§

impl<H> Send for TypedPbkdf2<H>
where H: Send,

§

impl<H> Sync for TypedPbkdf2<H>
where H: Sync,

§

impl<H> Unpin for TypedPbkdf2<H>
where H: Unpin,

§

impl<H> UnwindSafe for TypedPbkdf2<H>
where H: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V