Module Olm.Utility
type t={buf : char Ctypes.ptr;util : C.Types.Utility.t Ctypes_static.ptr;}
val clear : C.Types.Utility.t Ctypes_static.ptr -> (int, [> `OlmError ]) Core.resultclear utilClear memory backing the given
utilpointer.
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 utility objecttif so.
val alloc : unit -> talloc ()Allocate an
C.Types.Utility.tand return the pointers in at.
val create : unit -> tcreate ()Alias to
alloc (), as no additional actions that might cause creation to fail are required after allocation and instantiation.
val ed25519_verify : t -> string -> string -> string -> (int, [> OlmError.t ]) Core.resulted25519_verify t key message signatureVerify that
keywas used to signmessageto produce the ed25519signaturewith the utilityt.
val sha256 : t -> string -> (string, [> OlmError.t ]) Core.resultsha256 t inputUse
tto calculate the SHA-256 hash of theinputand encodes it as base64.