package ttweetnacl

  1. Overview
  2. Docs

Pre-computed shared secret key.

Use before to generate one.

type t

The type for shared secret keys.

val length : int

length is the byte length of shared keys.

val equal : t -> t -> bool

equal sk sk' determines in constant time if sk and sk' are bytewise equal.

val of_bytes : Bytes.t -> t

of_bytes b is a shared secret key from bytes b. Raises Invalid_argument if b's length differs from length.

val to_bytes : t -> Bytes.t

to_bytes sk are the bytes of sk.

val pp : Format.formatter -> t -> unit

pp ppf sk is an unspecified formatter for secret keys.

OCaml

Innovation. Community. Security.