Struct hkdf::HkdfExtract
source · pub struct HkdfExtract<H, I = Hmac<H>>where
H: OutputSizeUser,
I: HmacImpl<H>,{ /* private fields */ }
Expand description
Structure representing the streaming context of an HKDF-Extract operation
let mut extract_ctx = HkdfExtract::<Sha256>::new(Some(b"mysalt"));
extract_ctx.input_ikm(b"hello");
extract_ctx.input_ikm(b" world");
let (streamed_res, _) = extract_ctx.finalize();
let (oneshot_res, _) = Hkdf::<Sha256>::extract(Some(b"mysalt"), b"hello world");
assert_eq!(streamed_res, oneshot_res);
Implementations§
Trait Implementations§
source§impl<H, I> Clone for HkdfExtract<H, I>
impl<H, I> Clone for HkdfExtract<H, I>
source§fn clone(&self) -> HkdfExtract<H, I>
fn clone(&self) -> HkdfExtract<H, I>
Returns a copy 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 moresource§impl<H, I> Debug for HkdfExtract<H, I>
impl<H, I> Debug for HkdfExtract<H, I>
Auto Trait Implementations§
impl<H, I> Freeze for HkdfExtract<H, I>where
I: Freeze,
impl<H, I> RefUnwindSafe for HkdfExtract<H, I>where
I: RefUnwindSafe,
H: RefUnwindSafe,
impl<H, I> Send for HkdfExtract<H, I>
impl<H, I> Sync for HkdfExtract<H, I>
impl<H, I> Unpin for HkdfExtract<H, I>
impl<H, I> UnwindSafe for HkdfExtract<H, I>where
I: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)