SealdSdk_RetrieveEncryptionSessionByTmr method

int SealdSdk_RetrieveEncryptionSessionByTmr(
  1. Pointer<NativeSealdSdk> sealdSdk,
  2. Pointer<Utf8> tmrJWT,
  3. Pointer<Utf8> sessionId,
  4. Pointer<Uint8> overEncryptionKey,
  5. int overEncryptionKeyLen,
  6. Pointer<NativeSealdTmrAccessesRetrievalFilters> tmrAccessesRetrievalFilters,
  7. int tryIfMultiple,
  8. int useCache,
  9. Pointer<Pointer<NativeSealdEncryptionSession>> result,
  10. Pointer<Pointer<NativeSealdError>> error,
)

Retrieve an encryption session with a TMR access JWT.

@param sealdSdk The SealdSdk instance. @param tmrJWT The TMR JWT. @param sessionId The id of the session to retrieve. @param overEncryptionKey The TMR over-encryption key. This MUST be a cryptographically random buffer of 64 bytes. @param overEncryptionKeyLen The length of overEncryptionKey. @param tmrAccessesRetrievalFilters Retrieval tmr accesses filters. If multiple TMR Accesses for this session are associated with the auth factor, filter out the unwanted ones. @param tryIfMultiple If multiple accesses are found for this session associated with the auth factor, whether or not to loop over all of them to find the wanted one. 1 to loop, 0 otherwise. @param useCache Whether or not to use the cache (if enabled globally). 1 to use cache, 0 to not use it. @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_RetrieveEncryptionSessionByTmr(
  ffi.Pointer<NativeSealdSdk> sealdSdk,
  ffi.Pointer<pkg_ffi.Utf8> tmrJWT,
  ffi.Pointer<pkg_ffi.Utf8> sessionId,
  ffi.Pointer<ffi.Uint8> overEncryptionKey,
  int overEncryptionKeyLen,
  ffi.Pointer<NativeSealdTmrAccessesRetrievalFilters>
      tmrAccessesRetrievalFilters,
  int tryIfMultiple,
  int useCache,
  ffi.Pointer<ffi.Pointer<NativeSealdEncryptionSession>> result,
  ffi.Pointer<ffi.Pointer<NativeSealdError>> error,
) {
  return _SealdSdk_RetrieveEncryptionSessionByTmr(
    sealdSdk,
    tmrJWT,
    sessionId,
    overEncryptionKey,
    overEncryptionKeyLen,
    tmrAccessesRetrievalFilters,
    tryIfMultiple,
    useCache,
    result,
    error,
  );
}