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 { ... }
}
展开描述
A HMAC key , ready 用于 use.
此 算法 用 is implicit in the Hmac object that produced the key.
Calculates 一个 tag over the concatenation of first, the items in middle, 并 last。
Returns the length of the tag returned by 一个 computation using
this key.
Calculates 一个 tag over data – 一个 slice of byte slices.