SealdSdk_RetrieveEncryptionSession method

int SealdSdk_RetrieveEncryptionSession(
  1. Pointer<NativeSealdSdk> sealdSdk,
  2. Pointer<Utf8> messageId,
  3. int useCache,
  4. int lookupProxyKey,
  5. int lookupGroupKey,
  6. Pointer<Pointer<NativeSealdEncryptionSession>> result,
  7. Pointer<Pointer<NativeSealdError>> error,
)

Retrieve an encryption session with the messageId, and returns the associated SealdEncryptionSession instance, with which you can then encrypt / decrypt multiple messages.

@param sealdSdk The SealdSdk instance. @param messageId The ID of the message belonging to the session to retrieve. @param useCache Whether or not to use the cache (if enabled globally). 1 to use cache, 0 to not use it. @param lookupProxyKey Whether or not to try retrieving the session via a proxy. 1 for True, 0 for False. @param lookupGroupKey Whether or not to try retrieving the session via a group. 1 for True, 0 for False. @param result A pointer where to store the retrieved 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_RetrieveEncryptionSession(
  ffi.Pointer<NativeSealdSdk> sealdSdk,
  ffi.Pointer<pkg_ffi.Utf8> messageId,
  int useCache,
  int lookupProxyKey,
  int lookupGroupKey,
  ffi.Pointer<ffi.Pointer<NativeSealdEncryptionSession>> result,
  ffi.Pointer<ffi.Pointer<NativeSealdError>> error,
) {
  return _SealdSdk_RetrieveEncryptionSession(
    sealdSdk,
    messageId,
    useCache,
    lookupProxyKey,
    lookupGroupKey,
    result,
    error,
  );
}