Skip to main content

KdfWithDefaults

Struct KdfWithDefaults 

Source
pub struct KdfWithDefaults<T>(/* private fields */);
Available on crate feature test_util only.
Expand description

A Kdf that that uses the default trait methods.

Trait Implementations§

Source§

impl<T: Clone> Clone for KdfWithDefaults<T>

Source§

fn clone(&self) -> KdfWithDefaults<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> Debug for KdfWithDefaults<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Identified> Identified for KdfWithDefaults<T>

Source§

const OID: &'static Oid = T::OID

The algorithm’s OID.
Source§

impl<T: Kdf> Kdf for KdfWithDefaults<T>

Source§

type MaxOutput = <T as Kdf>::MaxOutput

The size in octets of the largest key that can be created with expand, expand_multi, or extract_and_expand. Read more
Source§

type PrkSize = <T as Kdf>::PrkSize

The size in octets of a pseudorandom key used by this Kdf. Read more
Source§

fn extract_multi<'a, I>(ikm: I, salt: &[u8]) -> Prk<Self::PrkSize>
where I: IntoIterator<Item = &'a [u8]>,

Identical to Kdf::extract, but accepts the ikm parameter as multiple parts. Read more
Source§

fn expand_multi<'a, I>( out: &mut [u8], prk: &Prk<Self::PrkSize>, info: I, ) -> Result<(), KdfError>
where I: IntoIterator<Item = &'a [u8], IntoIter: Clone>,

Identical to Kdf::expand, but accepts the info parameter as multiple parts. Read more
Source§

const MAX_OUTPUT: usize = <Self::MaxOutput>::USIZE

The size in octets of the largest key that can be created with expand, expand_multi, or extract_and_expand. Read more
Source§

const PRK_SIZE: usize = <Self::PrkSize>::USIZE

Shorthand for PrkSize.
Source§

fn extract(ikm: &[u8], salt: &[u8]) -> Prk<Self::PrkSize>

A randomness extractor that extracts a fixed-length pseudorandom key (PRK) from the Input Keying Material (IKM) and an optional salt. Read more
Source§

fn expand( out: &mut [u8], prk: &Prk<Self::PrkSize>, info: &[u8], ) -> Result<(), KdfError>

A Pseudo Random Function (PRF) that expands the PRK with an optional info parameter into a key. Read more
Source§

fn extract_and_expand( out: &mut [u8], ikm: &[u8], salt: &[u8], info: &[u8], ) -> Result<(), KdfError>

Performs both the extract and expand steps. Read more
Source§

fn extract_and_expand_multi<'a, Ikm, Info>( out: &mut [u8], ikm: Ikm, salt: &[u8], info: Info, ) -> Result<(), KdfError>
where Ikm: IntoIterator<Item = &'a [u8]>, Info: IntoIterator<Item = &'a [u8], IntoIter: Clone>,

Performs both the extract and expand steps. Read more

Auto Trait Implementations§

§

impl<T> Freeze for KdfWithDefaults<T>

§

impl<T> RefUnwindSafe for KdfWithDefaults<T>

§

impl<T> Send for KdfWithDefaults<T>

§

impl<T> Sync for KdfWithDefaults<T>

§

impl<T> Unpin for KdfWithDefaults<T>

§

impl<T> UnwindSafe for KdfWithDefaults<T>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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