package ttweetnacl

  1. Overview
  2. Docs

Secret keys.

Use keypair to generate one.

type t

The type for secret keys.

val length : int

length is the byte length of secret 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 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.