createAnonymousEncryptionSession method

SealdAnonymousEncryptionSession createAnonymousEncryptionSession(
  1. String encryptionToken,
  2. String getKeysToken,
  3. List<String> recipients, {
  4. List<SealdAnonymousTmrRecipient>? tmrRecipients,
})

Create an anonymous encryption session, and returns the associated SealdAnonymousEncryptionSession instance, with which you can then encrypt/decrypt multiple messages.

encryptionToken - Mandatory. The JWT used for EncryptionSession creation. getKeysToken - Optional. The JWT used for the key retrieval. If not supplied, the key retrieval will use encryptionToken recipients - The Seald IDs of users who should be able to retrieve this session. tmrRecipients - Array of TMR recipients of the session to create. Returns the created SealdAnonymousEncryptionSession instance.

Implementation

SealdAnonymousEncryptionSession createAnonymousEncryptionSession(
    String encryptionToken, String getKeysToken, List<String> recipients,
    {List<SealdAnonymousTmrRecipient>? tmrRecipients}) {
  return SealdAnonymousEncryptionSession._fromC(
      _createAnonymousEncryptionSession(
              encryptionToken, getKeysToken, recipients,
              tmrRecipients: tmrRecipients)
          .pointer());
}