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: Kdf> HpkeKdf for KdfWithDefaults<T>

Source§

const ID: KdfId = T::ID

Identifies the KDF algorithm per IANA.
Source§

impl<T: Kdf> 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]>, <Info as IntoIterator>::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>
where T: RefUnwindSafe,

§

impl<T> Send for KdfWithDefaults<T>
where T: Send,

§

impl<T> Sync for KdfWithDefaults<T>
where T: Sync,

§

impl<T> Unpin for KdfWithDefaults<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for KdfWithDefaults<T>

§

impl<T> UnwindSafe for KdfWithDefaults<T>
where T: 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> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
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> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
Source§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

Source§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
Source§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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

Source§

impl<K> Kdf for K
where K: HpkeKdf + Identified,