SealdAnonymousSdk_CreateAnonymousEncryptionSession method

int SealdAnonymousSdk_CreateAnonymousEncryptionSession(
  1. Pointer<NativeSealdAnonymousSdk> sealdAnonymousSdk,
  2. Pointer<Utf8> encryptionToken,
  3. Pointer<Utf8> getKeysToken,
  4. Pointer<NativeSealdStringArray> recipients,
  5. Pointer<NativeSealdAnonymousTmrRecipientsArray> tmrRecipients,
  6. Pointer<Pointer<NativeSealdAnonymousEncryptionSession>> result,
  7. Pointer<Pointer<NativeSealdError>> error,
)

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,
  );
}