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.

Finalizes this authenticator, and verifies that the computed code matches other_mac using a constant-time comparison.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.