Module Olm.OutboundGroupSession
type t={buf : char Ctypes.ptr;ogs : C.Types.OutboundGroupSession.t Ctypes_static.ptr;}
val clear : C.Types.OutboundGroupSession.t Ctypes_static.ptr -> (int, [> `OlmError ]) Core.resultclear ogsClear memory backing the given
ogspointer.
val check_error : t -> Unsigned.size_t -> (int, [> OlmError.t ]) Core.resultcheck_error t retCheck whether return code
retis equal to `olm_error()` ( -1 ), returning the return value as an int if not, and the `last_error` from the outbound group sessiontif so.
val alloc : unit -> talloc ()Allocate an
C.Types.OutboundGroupSession.tand return the pointers in at.
val create : unit -> (t, [> OlmError.t ]) Core.resultcreate ()Start a new outbound group session.
val pickle : ?pass:string -> t -> (string, [> OlmError.t ]) Core.resultpickle ?pass tStores an outbound group session object
tas a base64 string. Encrypting it using the optionally supplied passphrasepass. Returns a base64 encoded string of the pickled outbound group session on success.
val from_pickle : ?pass:string -> string -> (t, [> OlmError.t | `ValueError of string ]) Core.resultfrom_pickle ?pass pickleLoads an outbound group session from a pickled base64-encoded string
pickleand returns at, decrypted with the optionally supplied passphrasepass. If the passphrase doesn't match the one used to encrypt the outbound group session then the error will be`BadAccountKey. If the base64 couldn't be decoded then the error will be`InvalidBase64.
val encrypt : t -> string -> (string, [> OlmError.t ]) Core.resultencrypt t plaintextEcrypts
plaintextwith the outbound group sessiont.
val id : t -> (string, [> OlmError.t ]) Core.resultid tA base64 encoded identifier for the session
t.
val message_index : t -> intmessage_index tThe current message index of the session
t. Each message is encrypted with an increasing index. This is the index for the next message.
val session_key : t -> (string, [> OlmError.t ]) Core.resultsession_key tThe base64-encoded current ratchet key for the session
t. Each message is encrypted with a different ratchet key. This function returns the ratchet key that will be used for the next message.