SealdAnonymousSdk_CreateAnonymousEncryptionSession method
- Pointer<
NativeSealdAnonymousSdk> sealdAnonymousSdk, - Pointer<
Utf8> encryptionToken, - Pointer<
Utf8> getKeysToken, - Pointer<
NativeSealdStringArray> recipients, - Pointer<
NativeSealdAnonymousTmrRecipientsArray> tmrRecipients, - Pointer<
Pointer< result,NativeSealdAnonymousEncryptionSession> > - Pointer<
Pointer< error,NativeSealdError> >
Create an anonymous encryption session, and returns the associated SealdAnonymousEncryptionSession instance, with which you can then encrypt / decrypt multiple messages.
@param sealdAnonymousSdk The SealdAnonymousSdk instance.
@param encryptionToken Mandatory. The JWT used for EncryptionSession creation.
@param getKeysToken Optional. The JWT used for the key retrieval. If not supplied, the key retrieval will use encryptionToken.
@param recipients The Seald IDs of users who should be able to retrieve this session.
@param tmrRecipients The TMR recipients who should be able to retrieve this session.
@param result A pointer where to store the created SealdAnonymousEncryptionSession 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 SealdAnonymousSdk_CreateAnonymousEncryptionSession(
ffi.Pointer<NativeSealdAnonymousSdk> sealdAnonymousSdk,
ffi.Pointer<pkg_ffi.Utf8> encryptionToken,
ffi.Pointer<pkg_ffi.Utf8> getKeysToken,
ffi.Pointer<NativeSealdStringArray> recipients,
ffi.Pointer<NativeSealdAnonymousTmrRecipientsArray> tmrRecipients,
ffi.Pointer<ffi.Pointer<NativeSealdAnonymousEncryptionSession>> result,
ffi.Pointer<ffi.Pointer<NativeSealdError>> error,
) {
return _SealdAnonymousSdk_CreateAnonymousEncryptionSession(
sealdAnonymousSdk,
encryptionToken,
getKeysToken,
recipients,
tmrRecipients,
result,
error,
);
}