hacl
Hacl.Box
type combined
type _ key
val skbytes : int
val pkbytes : int
val ckbytes : int
val zerobytes : int
val boxzerobytes : int
val equal : 'a key -> 'a key -> bool
val unsafe_to_bytes : _ key -> Bigstring.t
unsafe_to_bytes k is the internal Bigstring.t where the key is stored. DO NOT MODIFY.
unsafe_to_bytes k
Bigstring.t
val blit_to_bytes : _ key -> ?pos:int -> Bigstring.t -> unit
val unsafe_sk_of_bytes : Bigstring.t -> secret key
Invalid_argument
if argument is not skbytes bytes long
skbytes
val unsafe_pk_of_bytes : Bigstring.t -> public key
if argument is not pkbytes bytes long
pkbytes
val unsafe_ck_of_bytes : Bigstring.t -> combined key
if argument is not ckbytes bytes long
ckbytes
val of_seed : ?pos:int -> Bigstring.t -> secret key
if pos is outside the buffer or the buffer is less than skbytes bytes long
pos
val neuterize : secret key -> public key
val keypair : unit -> public key * secret key
val dh : public key -> secret key -> combined key
val box : k:combined key -> nonce:Bigstring.t -> msg:Bigstring.t -> cmsg:Bigstring.t -> unit
val box_open : k:combined key -> nonce:Bigstring.t -> cmsg:Bigstring.t -> msg:Bigstring.t -> bool