Module Box.Shared_secret_key

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 : Stdlib.Format.formatter -> t -> unit

pp ppf sk is an unspecified formatter for secret keys.