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