package ttweetnacl

  1. Overview
  2. Docs

Module CRYPTO.OnetimeauthSource

One-time authentication.

The primitive is poly1305, NaCl documentation.

Sourcemodule Secret_key : sig ... end

Secret keys.

Sourcemodule Authenticator : sig ... end

Authenticators.

Sourceval auth : secret_key:Secret_key.t -> Bytes.t -> Authenticator.t

auth ~secret_key m is an authenticator for message m under secret_key.

Sourceval verify : secret_key:Secret_key.t -> auth:Authenticator.t -> Bytes.t -> bool

verify ~secret_key ~auth m is true iff auth is a correct authenticator for message m under secret_key.