retrieveMultipleEncryptionSessionsAsync method

Future<List<SealdEncryptionSession>> retrieveMultipleEncryptionSessionsAsync(
  1. List<String> sessionIds, {
  2. bool useCache = true,
  3. bool lookupProxyKey = false,
  4. bool lookupGroupKey = true,
})

Retrieve multiple encryption sessions with a List of sessionIds, and return a List of the associated EncryptionSession instances, with which you can then encrypt / decrypt multiple messages. The returned List of EncryptionSession instances is in the same order as the input List.

sessionIds - The IDs of sessions to retrieve. useCache - Whether or not to use the cache (if enabled globally). lookupProxyKey - Whether or not to try retrieving the session via a proxy. lookupGroupKey - Whether or not to try retrieving the session via a group. Returns the List of retrieved SealdEncryptionSession instances.

Implementation

Future<List<SealdEncryptionSession>> retrieveMultipleEncryptionSessionsAsync(
    List<String> sessionIds,
    {bool useCache = true,
    bool lookupProxyKey = false,
    bool lookupGroupKey = true}) async {
  final _TransferablePointer<NativeSealdEncryptionSessionArray> res =
      await compute(
          (Map<String, dynamic> args) => _retrieveMultipleEncryptionSessions(
              args["sessionIds"],
              useCache: args["useCache"],
              lookupProxyKey: args["lookupProxyKey"],
              lookupGroupKey: args["lookupGroupKey"]),
          {
        "sessionIds": sessionIds,
        "useCache": useCache,
        "lookupProxyKey": lookupProxyKey,
        "lookupGroupKey": lookupGroupKey
      });
  return SealdEncryptionSession._fromCArray(res.pointer());
}