Skip to content

verify_mac

In std/crypto.

fn verify_mac<A : Mac>(self: Bytes, tag: Bytes, key: SecretKey<A>) : Bool

Whether tag is the MAC tag of self under key, compared in time independent of where it first differs.

fn verify_mac<A : Mac>(self: String, tag: Bytes, key: SecretKey<A>) : Bool

Whether tag is the MAC tag of the UTF-8 octets of self.