pub trait HmacUtils {
// Required methods
fn bits(&self) -> usize;
fn kdf_hash_length(
&self,
key: &[u8],
label: &str,
context: &[u8],
bits: usize,
) -> Vec<u8> ⓘ;
fn hkdf_extract(&self, salt: &[u8], ikm: &[u8]) -> Vec<u8> ⓘ;
fn hkdf_expand(&self, prk: &[u8], info: &str, length: usize) -> Vec<u8> ⓘ;
fn confirm(&self, key: &[u8], counter: u16, data: &[&[u8]]) -> Vec<u8> ⓘ;
}
Expand description
Trait encapsulating implementations of the HMAC constructions for a given hasher type.
Required Methods§
Sourcefn kdf_hash_length(
&self,
key: &[u8],
label: &str,
context: &[u8],
bits: usize,
) -> Vec<u8> ⓘ
fn kdf_hash_length( &self, key: &[u8], label: &str, context: &[u8], bits: usize, ) -> Vec<u8> ⓘ
See: kdf_hash_length()
Sourcefn hkdf_extract(&self, salt: &[u8], ikm: &[u8]) -> Vec<u8> ⓘ
fn hkdf_extract(&self, salt: &[u8], ikm: &[u8]) -> Vec<u8> ⓘ
See: hkdf_extract()
Sourcefn hkdf_expand(&self, prk: &[u8], info: &str, length: usize) -> Vec<u8> ⓘ
fn hkdf_expand(&self, prk: &[u8], info: &str, length: usize) -> Vec<u8> ⓘ
See: hkdf_expand()