CoreCryptoFfiInterface

CoreCrypto wraps around MLS and Proteus implementations and provides a transactional interface for each.

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract suspend fun clientPublicKey(ciphersuite: Ciphersuite, credentialType: CredentialType): ByteArray

See core_crypto::transaction_context::TransactionContext::client_public_key

Link copied to clipboard
abstract suspend fun conversationCiphersuite(conversationId: ConversationId): Ciphersuite

See core_crypto::mls::conversation::Conversation::ciphersuite

Link copied to clipboard
abstract suspend fun conversationEpoch(conversationId: ConversationId): ULong

See core_crypto::mls::conversation::Conversation::epoch

Link copied to clipboard
abstract suspend fun conversationExists(conversationId: ConversationId): Boolean

See core_crypto::Session::conversation_exists

Link copied to clipboard
abstract suspend fun e2eiIsEnabled(ciphersuite: Ciphersuite): Boolean

See core_crypto::Session::e2ei_is_enabled

Link copied to clipboard
abstract suspend fun e2eiIsPkiEnvSetup(): Boolean

See core_crypto::Session::e2ei_is_pki_env_setup

Link copied to clipboard
abstract suspend fun exportSecretKey(conversationId: ConversationId, keyLength: UInt): ByteArray

See core_crypto::mls::conversation::Conversation::export_secret_key

Link copied to clipboard
abstract suspend fun getClientIds(conversationId: ConversationId): List<ClientId>

See core_crypto::mls::conversation::Conversation::get_client_ids

Link copied to clipboard
abstract suspend fun getDeviceIdentities(conversationId: ConversationId, deviceIds: List<ClientId>): List<WireIdentity>

See core_crypto::mls::conversation::Conversation::get_device_identities

Link copied to clipboard
abstract suspend fun getExternalSender(conversationId: ConversationId): ByteArray

See core_crypto::mls::conversation::Conversation::get_external_sender

Link copied to clipboard
abstract suspend fun getUserIdentities(conversationId: ConversationId, userIds: List<String>): Map<String, List<WireIdentity>>

See core_crypto::mls::conversation::Conversation::get_user_identities

Link copied to clipboard
abstract suspend fun isHistorySharingEnabled(conversationId: ConversationId): Boolean

See core_crypto::mls::conversation::Conversation::is_history_sharing_enabled

Link copied to clipboard
abstract suspend fun proteusFingerprint(): String

See core_crypto::proteus::ProteusCentral::fingerprint

Link copied to clipboard
abstract suspend fun proteusFingerprintLocal(sessionId: String): String

See core_crypto::proteus::ProteusCentral::fingerprint_local

Link copied to clipboard

See core_crypto::proteus::ProteusCentral::fingerprint_prekeybundle

Link copied to clipboard
abstract suspend fun proteusFingerprintRemote(sessionId: String): String

See core_crypto::proteus::ProteusCentral::fingerprint_remote

Link copied to clipboard

See core_crypto::proteus::ProteusCentral::last_resort_prekey_id

Link copied to clipboard
abstract suspend fun proteusSessionExists(sessionId: String): Boolean

See core_crypto::proteus::ProteusCentral::session_exists

Link copied to clipboard
abstract suspend fun provideTransport(callbacks: MlsTransport)

See core_crypto::Session::provide_transport

Link copied to clipboard
abstract suspend fun randomBytes(len: UInt): ByteArray

See core_crypto::Session::random_bytes

Link copied to clipboard
abstract suspend fun registerEpochObserver(epochObserver: EpochObserver)

Add an epoch observer to this client.

Link copied to clipboard
abstract suspend fun registerHistoryObserver(historyObserver: HistoryObserver)

Add a history observer to this client.

Link copied to clipboard
abstract suspend fun reseedRng(seed: ByteArray)

see core_crypto::Session::reseed

Link copied to clipboard
abstract suspend fun transaction(command: CoreCryptoCommand)

Starts a new transaction in Core Crypto. If the callback succeeds, it will be committed, otherwise, every operation performed with the context will be discarded.