package hacl

  1. Overview
  2. Docs

Module Hacl.BoxSource

Sourcetype combined
Sourcetype _ key
Sourceval skbytes : int
Sourceval pkbytes : int
Sourceval ckbytes : int
Sourceval zerobytes : int
Sourceval boxzerobytes : int
Sourceval equal : 'a key -> 'a key -> bool
Sourceval unsafe_to_bytes : _ key -> Bigstring.t

unsafe_to_bytes k is the internal Bigstring.t where the key is stored. DO NOT MODIFY.

Sourceval blit_to_bytes : _ key -> ?pos:int -> Bigstring.t -> unit
Sourceval unsafe_sk_of_bytes : Bigstring.t -> secret key
Sourceval unsafe_pk_of_bytes : Bigstring.t -> public key
Sourceval unsafe_ck_of_bytes : Bigstring.t -> combined key
Sourceval of_seed : ?pos:int -> Bigstring.t -> secret key
  • raises Invalid_argument

    if pos is outside the buffer or the buffer is less than skbytes bytes long

Sourceval neuterize : secret key -> public key
Sourceval keypair : unit -> public key * secret key
Sourceval box : k:combined key -> nonce:Bigstring.t -> msg:Bigstring.t -> cmsg:Bigstring.t -> unit
Sourceval box_open : k:combined key -> nonce:Bigstring.t -> cmsg:Bigstring.t -> msg:Bigstring.t -> bool
OCaml

Innovation. Community. Security.