SealdSdk_CreateEncryptionSession method
- Pointer<
NativeSealdSdk> sealdSdk, - Pointer<
NativeSealdRecipientsWithRightsArray> recipients, - Pointer<
Utf8> metadata, - int useCache,
- Pointer<
Pointer< result,NativeSealdEncryptionSession> > - Pointer<
Pointer< error,NativeSealdError> >
Create an encryption session, and returns the associated SealdEncryptionSession instance,
with which you can then encrypt / decrypt multiple messages.
Warning : if you want to be able to retrieve the session later,
you must put your own Seald ID in the recipients argument.
@param sealdSdk The SealdSdk instance.
@param recipients The Seald IDs of users who should be able to retrieve this session.
@param metadata Arbitrary metadata string, not encrypted, for later reference. Max 1024 characters long.
@param useCache Whether or not to use the cache (if enabled globally). 1 to use cache, 0 to not use it.
@param result A pointer where to store the created SealdEncryptionSession instance.
@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 SealdSdk_CreateEncryptionSession(
ffi.Pointer<NativeSealdSdk> sealdSdk,
ffi.Pointer<NativeSealdRecipientsWithRightsArray> recipients,
ffi.Pointer<pkg_ffi.Utf8> metadata,
int useCache,
ffi.Pointer<ffi.Pointer<NativeSealdEncryptionSession>> result,
ffi.Pointer<ffi.Pointer<NativeSealdError>> error,
) {
return _SealdSdk_CreateEncryptionSession(
sealdSdk,
recipients,
metadata,
useCache,
result,
error,
);
}