[−][src]Struct hkdf::Hkdf
Structure representing the HKDF, capable of HKDF-Expand and HKDF-extract operations.
Implementations
impl<D> Hkdf<D> where
D: Update + BlockInput + FixedOutput + Reset + Default + Clone,
D::BlockSize: ArrayLength<u8>,
D::OutputSize: ArrayLength<u8>,
[src]
D: Update + BlockInput + FixedOutput + Reset + Default + Clone,
D::BlockSize: ArrayLength<u8>,
D::OutputSize: ArrayLength<u8>,
pub fn new(salt: Option<&[u8]>, ikm: &[u8]) -> Hkdf<D>
[src]
Convenience method for [extract
] when the generated pseudorandom
key can be ignored and only HKDF-Expand operation is needed. This is
the most common constructor.
pub fn from_prk(prk: &[u8]) -> Result<Hkdf<D>, InvalidPrkLength>
[src]
Create Hkdf
from an already cryptographically strong pseudorandom key
as per section 3.3 from RFC5869.
pub fn extract(
salt: Option<&[u8]>,
ikm: &[u8]
) -> (GenericArray<u8, D::OutputSize>, Hkdf<D>)
[src]
salt: Option<&[u8]>,
ikm: &[u8]
) -> (GenericArray<u8, D::OutputSize>, Hkdf<D>)
The RFC5869 HKDF-Extract operation returning both the generated
pseudorandom key and Hkdf
struct for expanding.
pub fn expand(&self, info: &[u8], okm: &mut [u8]) -> Result<(), InvalidLength>
[src]
The RFC5869 HKDF-Expand operation
Trait Implementations
impl<D: Clone> Clone for Hkdf<D> where
D: Update + BlockInput + FixedOutput + Reset + Default + Clone,
D::BlockSize: ArrayLength<u8>,
D::OutputSize: ArrayLength<u8>,
[src]
D: Update + BlockInput + FixedOutput + Reset + Default + Clone,
D::BlockSize: ArrayLength<u8>,
D::OutputSize: ArrayLength<u8>,
Auto Trait Implementations
impl<D> RefUnwindSafe for Hkdf<D> where
D: RefUnwindSafe,
<<D as BlockInput>::BlockSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
D: RefUnwindSafe,
<<D as BlockInput>::BlockSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
impl<D> Send for Hkdf<D> where
D: Send,
D: Send,
impl<D> Sync for Hkdf<D> where
D: Sync,
D: Sync,
impl<D> Unpin for Hkdf<D> where
D: Unpin,
<<D as BlockInput>::BlockSize as ArrayLength<u8>>::ArrayType: Unpin,
D: Unpin,
<<D as BlockInput>::BlockSize as ArrayLength<u8>>::ArrayType: Unpin,
impl<D> UnwindSafe for Hkdf<D> where
D: UnwindSafe,
<<D as BlockInput>::BlockSize as ArrayLength<u8>>::ArrayType: UnwindSafe,
D: UnwindSafe,
<<D as BlockInput>::BlockSize as ArrayLength<u8>>::ArrayType: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,