core::crypto::hmac
API 參考只有英文版,由標準函式庫原始碼中的英文文件註解產生。
HMAC (RFC 2104) over any HashAlgorithm, SHA-2 or SHA-3.
Structs
HmacSource
pub struct HmacA running HMAC. A value: copying it forks the running MAC.
Sourcepub fn new<B: AsBytes>(§alg: HashAlgorithm, key: B) -> Hmac An incremental HMAC with
key(any length; a key longer than the block is hashed first).The tag of
dataunderkey.
Sourcepub fn verify<K: AsBytes, D: AsBytes, T: AsBytes>(§alg: HashAlgorithm, key: K, data: D, tag: T) -> bool Whether
tagis the tag ofdata, compared in constant time.Feed
datainto the MAC; callfinishfor the tag.The tag of everything fed so far, the hash's output length.
Trait implementations 1
impl Debug for Hmac