pub struct Hkdf;Expand description
HKDF key derivation (RFC 5869)
Implementations§
Source§impl Hkdf
impl Hkdf
Sourcepub fn derive_key(
input_key_material: &[u8],
salt: &[u8],
info: &[u8],
output_length: usize,
) -> DerivedKey
pub fn derive_key( input_key_material: &[u8], salt: &[u8], info: &[u8], output_length: usize, ) -> DerivedKey
Extract-and-Expand key derivation using HMAC-SHA256
§Arguments
input_key_material- Input keying materialsalt- Optional salt (use empty slice if none)info- Optional context/application infooutput_length- Desired output length in bytes
Sourcepub fn derive_multiple_keys(
input_key_material: &[u8],
salt: &[u8],
contexts: &[&[u8]],
key_length: usize,
) -> Vec<DerivedKey>
pub fn derive_multiple_keys( input_key_material: &[u8], salt: &[u8], contexts: &[&[u8]], key_length: usize, ) -> Vec<DerivedKey>
Derive multiple keys from a single input
Auto Trait Implementations§
impl Freeze for Hkdf
impl RefUnwindSafe for Hkdf
impl Send for Hkdf
impl Sync for Hkdf
impl Unpin for Hkdf
impl UnwindSafe for Hkdf
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