pub struct Hkdf<T: HashEngine> { /* private fields */ }Expand description
HMAC-based Extract-and-Expand Key Derivation Function (HKDF).
Implementations§
Source§impl<T> Hkdf<T>where
T: Default + HashEngine,
impl<T> Hkdf<T>where
T: Default + HashEngine,
Sourcepub fn expand(&self, info: &[u8], okm: &mut [u8]) -> Result<(), MaxLengthError>
pub fn expand(&self, info: &[u8], okm: &mut [u8]) -> Result<(), MaxLengthError>
Expand the key to generate output key material in okm.
Expand may be called multiple times to derive multiple keys, but the info must be independent from the ikm for security.
Sourcepub fn expand_to_len(
&self,
info: &[u8],
len: usize,
) -> Result<Vec<u8>, MaxLengthError>
pub fn expand_to_len( &self, info: &[u8], len: usize, ) -> Result<Vec<u8>, MaxLengthError>
Expand the key to specified length.
Expand may be called multiple times to derive multiple keys, but the info must be independent from the ikm for security.
Trait Implementations§
Source§impl<T: HashEngine> Debug for Hkdf<T>
impl<T: HashEngine> Debug for Hkdf<T>
impl<T: Copy + HashEngine> Copy for Hkdf<T>
Auto Trait Implementations§
impl<T> Freeze for Hkdf<T>
impl<T> RefUnwindSafe for Hkdf<T>
impl<T> Send for Hkdf<T>
impl<T> Sync for Hkdf<T>
impl<T> Unpin for Hkdf<T>
impl<T> UnwindSafe for Hkdf<T>
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