CryptoTransactionProvider
interface CryptoTransactionProvider
Provides transactional access to cryptographic operations using either Proteus or a combined context (Proteus + MLS).
This interface is designed to encapsulate the logic of obtaining and executing transactional operations on cryptographic clients in a safe, composable way.
The typical usage pattern is to call one of the transaction(...)
methods with a suspending lambda that operates on the appropriate crypto context. The method ensures the client is resolved, a transaction is started, and the provided block is executed within that context.
Example:
cryptoTransactionProvider.proteusTransaction { proteus ->
proteus.encrypt(message, sessionId)
}
Content copied to clipboard
Inheritors
Functions
Link copied to clipboard
abstract suspend fun <R> mlsTransaction(name: String? = null, block: suspend (<Error class: unknown class>) -> <Error class: unknown class><<Error class: unknown class>, R>): <Error class: unknown class><<Error class: unknown class>, R>
Link copied to clipboard
abstract suspend fun <R> proteusTransaction(name: String? = null, block: suspend (<Error class: unknown class>) -> <Error class: unknown class><<Error class: unknown class>, R>): <Error class: unknown class><<Error class: unknown class>, R>
Link copied to clipboard
abstract suspend fun <R> transaction(name: String? = null, block: suspend (<Error class: unknown class>) -> <Error class: unknown class><<Error class: unknown class>, R>): <Error class: unknown class><<Error class: unknown class>, R>