SealdEncryptionSession_Serialize method

int SealdEncryptionSession_Serialize(
  1. Pointer<NativeSealdEncryptionSession> es,
  2. Pointer<Pointer<Utf8>> result,
  3. Pointer<Pointer<NativeSealdError>> error
)

Serialize the EncryptionSession to a string. This is for advanced use. May be used to keep sessions in a cache. WARNING: a user could use this cache to work around being revoked. Use with caution. WARNING: if the cache is accessible to another user, they could use it to decrypt messages they are not supposed to have access to. Make sure only the current user in question can access this cache, for example by encrypting it.

@param es The SealdEncryptionSession instance. @param result A pointer to which to write the resulting serialized encryption session. @param error A pointer to a SealdError* where details will be stored in case of error. @return Error code: -1 if an error happened, 0 for success.

Implementation

int SealdEncryptionSession_Serialize(
  ffi.Pointer<NativeSealdEncryptionSession> es,
  ffi.Pointer<ffi.Pointer<pkg_ffi.Utf8>> result,
  ffi.Pointer<ffi.Pointer<NativeSealdError>> error,
) {
  return _SealdEncryptionSession_Serialize(
    es,
    result,
    error,
  );
}