Type Alias ring::hmac::SigningContext
source · pub type SigningContext = Context;
👎Deprecated: Renamed to
hmac::Context
.Expand description
hmac::SigningContext
was renamed to hmac::Context
.
Aliased Type§
struct SigningContext { /* private fields */ }
Implementations§
source§impl Context
impl Context
sourcepub fn with_key(signing_key: &Key) -> Self
pub fn with_key(signing_key: &Key) -> Self
Constructs a new HMAC signing context using the given digest algorithm and key.
sourcepub fn update(&mut self, data: &[u8])
pub fn update(&mut self, data: &[u8])
Updates the HMAC with all the data in data
. update
may be called
zero or more times until finish
is called.
sourcepub fn sign(self) -> Tag
pub fn sign(self) -> Tag
Finalizes the HMAC calculation and returns the HMAC value. sign
consumes the context so it cannot be (mis-)used after sign
has been
called.
It is generally not safe to implement HMAC verification by comparing
the return value of sign
to a tag. Use verify
for verification
instead.