Skip to content

retrieveEncryptionSessionByTmrAsync

@JvmOverloads

suspend fun retrieveEncryptionSessionByTmrAsync(tmrJWT: String, sessionId: String, overEncryptionKey: ByteArray, tmrAccessesFilters: TMRAccessesRetrievalFilters? = null, tryIfMultiple: Boolean = true, useCache: Boolean = true): EncryptionSession

Retrieve an encryption session with a TMR access JWT, and returns the associated EncryptionSession instance, with which you can then encrypt / decrypt this file.

Return

The retrieved EncryptionSession.

Parameters

tmrJWTThe TMR JWT.
sessionIdThe id of the session to retrieve.
overEncryptionKeyTMR over-encryption key. This MUST be a cryptographically random buffer of 64 bytes.
tmrAccessesFiltersRetrieval tmr accesses filters. If multiple TMR Accesses for this session are associated with the auth factor, filter out the unwanted ones.
tryIfMultipleIf 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.
useCacheWhether or not to use the cache (if enabled globally).

Throws

SealdException