rustls::crypto::hmac

Trait Key

Source
pub trait Key: Send + Sync {
    // Required methods
    fn sign_concat(&self, first: &[u8], middle: &[&[u8]], last: &[u8]) -> Tag;
    fn tag_len(&self) -> usize;

    // Provided method
    fn sign(&self, data: &[&[u8]]) -> Tag { ... }
}
Expand description

A HMAC key that is ready for use.

The algorithm used is implicit in the Hmac object that produced the key.

Required Methods§

Source

fn sign_concat(&self, first: &[u8], middle: &[&[u8]], last: &[u8]) -> Tag

Calculates a tag over the concatenation of first, the items in middle, and last.

Source

fn tag_len(&self) -> usize

Returns the length of the tag returned by a computation using this key.

Provided Methods§

Source

fn sign(&self, data: &[&[u8]]) -> Tag

Calculates a tag over data – a slice of byte slices.

Implementors§