package sodium

  1. Overview
  2. Docs
type storage
val of_key : secret key -> storage

of_key k converts k to storage. The result is key_size bytes long.

val to_key : storage -> secret key

to_key s converts s to a secret key.

val of_auth : auth -> storage

of_auth a converts a to storage. The result is auth_size bytes long.

val to_auth : storage -> auth

to_auth s converts s to an authenticator.

val auth : secret key -> storage -> auth

auth k m authenticates a message m using a secret key k, and returns an authenticator a.

val verify : secret key -> auth -> storage -> unit

verify k a m checks that a is a correct authenticator of a message m under the secret key k.

OCaml

Innovation. Community. Security.