Struct dryoc::auth::Auth [−][src]
pub struct Auth { /* fields omitted */ }
Expand description
secret-key authentication implementation based on Poly1305, compatible with
libsodium’s crypto_Auth_*
functions.
Implementations
Single-part interface for Auth
. Computes (and returns) the
message authentication code for input
using key
. The key
is
consumed to prevent accidental re-use of the same key.
Convience wrapper around Auth::compute
. Returns the message
authentication code as a Vec
. The key
is
consumed to prevent accidental re-use of the same key.
Verifies the message authentication code other_mac
matches the
expected code for key
and input
. The key
is
consumed to prevent accidental re-use of the same key.
Returns a new secret-key authenticator for key
. The key
is
consumed to prevent accidental re-use of the same key.
Updates the secret-key authenticator at self
with input
.
Finalizes this secret-key authenticator, returning the message authentication code.
Finalizes this secret-key authenticator, returning the message
authentication code as a Vec
. Convenience wrapper around
Auth::finalize
.