SealdSdk_RetrieveEncryptionSessionByTmr method
- Pointer<
NativeSealdSdk> sealdSdk, - Pointer<
Utf8> tmrJWT, - Pointer<
Utf8> sessionId, - Pointer<
Uint8> overEncryptionKey, - int overEncryptionKeyLen,
- Pointer<
NativeSealdTmrAccessesRetrievalFilters> tmrAccessesRetrievalFilters, - int tryIfMultiple,
- int useCache,
- Pointer<
Pointer< result,NativeSealdEncryptionSession> > - Pointer<
Pointer< error,NativeSealdError> >
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,
);
}