Module Session.Message

type t = private
| PreKey of string
| Message of string
val ciphertext : t -> string

ciphertext t

val is_pre_key : t -> bool

is_pre_key t

val to_size : t -> Unsigned.size_t

to_size t

The size_t identifier of this message's type. PreKey = 0, Message = 1.

val to_string : t -> string

to_string t

val create : string -> int -> (t[> `ValueError of string ]) Core.result

create text message_type_int

Only means of creating a Message.t. text must not be empty, and message_type_int must be 0 (PreKey) or 1 (Message). The type is returned by C.Funcs.encrypt_message_type as a size_t. `ValueError if these conditions are not met.