Trait rustls::crypto::hmac::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§