wlan_sae::hmac_utils

Trait HmacUtils

Source
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§

Source

fn bits(&self) -> usize

The number of bits in the digest length of the HMAC type.

Source

fn kdf_hash_length( &self, key: &[u8], label: &str, context: &[u8], bits: usize, ) -> Vec<u8>

Source

fn hkdf_extract(&self, salt: &[u8], ikm: &[u8]) -> Vec<u8>

Source

fn hkdf_expand(&self, prk: &[u8], info: &str, length: usize) -> Vec<u8>

Source

fn confirm(&self, key: &[u8], counter: u16, data: &[&[u8]]) -> Vec<u8>

See: confirm()

Implementors§

Source§

impl<H> HmacUtils for HmacUtilsImpl<H>
where H: Hasher, <<H as Hasher>::Digest as Digest>::Bytes: AsMut<[u8]> + AsRef<[u8]>,