pub struct GenericHkdfExtract<H: HmacImpl> {
pub(crate) hmac: H,
}Expand description
Structure representing the streaming context of an HKDF-Extract operation.
This type is generic over HMAC implementation. Most users should use
HkdfExtract or SimpleHkdfExtract type aliases.
Fields§
§hmac: HImplementations§
Source§impl<H: HmacImpl> GenericHkdfExtract<H>
impl<H: HmacImpl> GenericHkdfExtract<H>
Sourcepub fn new(salt: Option<&[u8]>) -> Self
pub fn new(salt: Option<&[u8]>) -> Self
Initiates the HKDF-Extract context with the given optional salt
Sourcepub fn input_ikm(&mut self, ikm: &[u8])
pub fn input_ikm(&mut self, ikm: &[u8])
Feeds in additional input key material to the HKDF-Extract context
Sourcepub fn finalize(self) -> (Output<H>, GenericHkdf<H>)
pub fn finalize(self) -> (Output<H>, GenericHkdf<H>)
Completes the HKDF-Extract operation, returning both the generated pseudorandom key and
Hkdf struct for expanding.
Trait Implementations§
Source§impl<H: Clone + HmacImpl> Clone for GenericHkdfExtract<H>
impl<H: Clone + HmacImpl> Clone for GenericHkdfExtract<H>
Source§fn clone(&self) -> GenericHkdfExtract<H>
fn clone(&self) -> GenericHkdfExtract<H>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<H> Freeze for GenericHkdfExtract<H>where
H: Freeze,
impl<H> RefUnwindSafe for GenericHkdfExtract<H>where
H: RefUnwindSafe,
impl<H> Send for GenericHkdfExtract<H>where
H: Send,
impl<H> Sync for GenericHkdfExtract<H>where
H: Sync,
impl<H> Unpin for GenericHkdfExtract<H>where
H: Unpin,
impl<H> UnsafeUnpin for GenericHkdfExtract<H>where
H: UnsafeUnpin,
impl<H> UnwindSafe for GenericHkdfExtract<H>where
H: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more