package ttweetnacl

  1. Overview
  2. Docs

One-time authentication.

The primitive is poly1305, NaCl documentation.

module Secret_key : sig ... end

Secret keys.

module Authenticator : sig ... end

Authenticators.

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

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

val 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.

OCaml

Innovation. Community. Security.