Struct diem_sdk::crypto::hkdf::Hkdf [−][src]
pub struct Hkdf<D> where
D: Update + BlockInput + FixedOutput + Reset + Default + Clone,
<D as BlockInput>::BlockSize: ArrayLength<u8>,
<D as FixedOutput>::OutputSize: ArrayLength<u8>,
<D as FixedOutput>::OutputSize: IsGreaterOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>,
<<D as FixedOutput>::OutputSize as IsGreaterOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>>::Output == B1, { /* fields omitted */ }
Expand description
Structure representing the HKDF, capable of HKDF-Extract and HKDF-Expand operations, as defined in RFC 5869.
Implementations
impl<D> Hkdf<D> where
D: Update + BlockInput + FixedOutput + Reset + Default + Clone,
<D as BlockInput>::BlockSize: ArrayLength<u8>,
<D as BlockInput>::BlockSize: Clone,
<D as FixedOutput>::OutputSize: ArrayLength<u8>,
<D as FixedOutput>::OutputSize: IsGreaterOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>,
<<D as FixedOutput>::OutputSize as IsGreaterOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>>::Output == B1,
impl<D> Hkdf<D> where
D: Update + BlockInput + FixedOutput + Reset + Default + Clone,
<D as BlockInput>::BlockSize: ArrayLength<u8>,
<D as BlockInput>::BlockSize: Clone,
<D as FixedOutput>::OutputSize: ArrayLength<u8>,
<D as FixedOutput>::OutputSize: IsGreaterOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>,
<<D as FixedOutput>::OutputSize as IsGreaterOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>>::Output == B1,
The RFC5869 HKDF-Extract operation.
The RFC5869 HKDF-Expand operation.
HKDF Extract then Expand operation as a single step.
CAUTION: This is not recommended because it does not take an ikm (seed) as an input and
thus, it is not fully compliant with the HKDF RFC (which always expects a non-zero ikm).
Please use extract_then_expand
instead, unless you know what you are doing.
This api is currently required by the Noise protocol HKDF specs.
HKDF Extract then Expand operation as a single step, but without an ikm input.
Trait Implementations
impl<D> Clone for Hkdf<D> where
D: Clone + Update + BlockInput + FixedOutput + Reset + Default,
<D as BlockInput>::BlockSize: ArrayLength<u8>,
<D as FixedOutput>::OutputSize: ArrayLength<u8>,
<D as FixedOutput>::OutputSize: IsGreaterOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>,
<<D as FixedOutput>::OutputSize as IsGreaterOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>>::Output == B1,
impl<D> Clone for Hkdf<D> where
D: Clone + Update + BlockInput + FixedOutput + Reset + Default,
<D as BlockInput>::BlockSize: ArrayLength<u8>,
<D as FixedOutput>::OutputSize: ArrayLength<u8>,
<D as FixedOutput>::OutputSize: IsGreaterOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>,
<<D as FixedOutput>::OutputSize as IsGreaterOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>>::Output == B1,
impl<D> Debug for Hkdf<D> where
D: Debug + Update + BlockInput + FixedOutput + Reset + Default + Clone,
<D as BlockInput>::BlockSize: ArrayLength<u8>,
<D as FixedOutput>::OutputSize: ArrayLength<u8>,
<D as FixedOutput>::OutputSize: IsGreaterOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>,
<<D as FixedOutput>::OutputSize as IsGreaterOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>>::Output == B1,
impl<D> Debug for Hkdf<D> where
D: Debug + Update + BlockInput + FixedOutput + Reset + Default + Clone,
<D as BlockInput>::BlockSize: ArrayLength<u8>,
<D as FixedOutput>::OutputSize: ArrayLength<u8>,
<D as FixedOutput>::OutputSize: IsGreaterOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>,
<<D as FixedOutput>::OutputSize as IsGreaterOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>>::Output == B1,
Auto Trait Implementations
impl<D> RefUnwindSafe for Hkdf<D> where
D: RefUnwindSafe,
impl<D> UnwindSafe for Hkdf<D> where
D: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more