Module Pk.Encryption
type t={buf : char Ctypes.ptr;pk_enc : C.Types.PkEncryption.t Ctypes_static.ptr;}
val clear : C.Types.PkEncryption.t Ctypes_static.ptr -> (int, [> `OlmError ]) Core.resultclear pk_encClear memory backing the given
pk_encpointer.
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 pk encryption objecttif so.
val alloc : unit -> talloc ()Allocate an
C.Types.Pk.Encryption.tand return the pointers in at.
val create : string -> (t, [> OlmError.t | `ValueError of string ]) Core.resultcreate recipient_keyCreate a new PK encryption object with targeted at the supplied
recipient_key.
val encrypt : t -> string -> (Message.t, [> OlmError.t ]) Core.resultencrypt t plaintextEncrypts
plaintextwitht, returning aMessage.t.