CoreCryptoContextInterface

The CoreCryptoContext holds the primary CoreCrypto APIs.

An instance of this struct is provided to the function handed to CoreCrypto::transaction.

Every mutable operation is done through this struct. This struct will buffer all operations in memory and when TransactionContext::finish is called, it will persist the data into the keystore.

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract suspend fun addClientsToConversation(conversationId: ConversationId, keyPackages: List<KeyPackage>): List<String>?

See core_crypto::mls::conversation::ConversationGuard::add_members

Link copied to clipboard
abstract suspend fun clientKeypackages(ciphersuite: Ciphersuite, credentialType: CredentialType, amountRequested: UInt): List<KeyPackage>

See core_crypto::transaction_context::TransactionContext::get_or_create_client_keypackages

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 clientValidKeypackagesCount(ciphersuite: Ciphersuite, credentialType: CredentialType): ULong

See core_crypto::transaction_context::TransactionContext::client_valid_key_packages_count

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

See core_crypto::mls::conversation::ConversationGuard::commit_pending_proposals

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 createConversation(conversationId: ConversationId, creatorCredentialType: CredentialType, config: ConversationConfiguration)

See core_crypto::transaction_context::TransactionContext::new_conversation

Link copied to clipboard
abstract suspend fun decryptMessage(conversationId: ConversationId, payload: ByteArray): DecryptedMessage

See core_crypto::mls::conversation::ConversationGuard::decrypt_message

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

See core_crypto::transaction_context::TransactionContext::delete_stale_key_packages

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

See core_crypto::mls::conversation::ConversationGuard::disable_history_sharing

Link copied to clipboard
abstract suspend fun e2eiConversationState(conversationId: ConversationId): E2eiConversationState

See core_crypto::mls::conversation::Conversation::e2ei_conversation_state

Link copied to clipboard
abstract suspend fun e2eiEnrollmentStash(enrollment: E2eiEnrollment): ByteArray

See core_crypto::transaction_context::TransactionContext::e2ei_enrollment_stash

Link copied to clipboard
abstract suspend fun e2eiEnrollmentStashPop(handle: ByteArray): E2eiEnrollment

See core_crypto::transaction_context::TransactionContext::e2ei_enrollment_stash_pop

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 e2eiMlsInitOnly(enrollment: E2eiEnrollment, certificateChain: String): List<String>?

See core_crypto::transaction_context::TransactionContext::e2ei_mls_init_only

Link copied to clipboard
abstract suspend fun e2eiNewActivationEnrollment(displayName: String, handle: String, team: String?, expirySec: UInt, ciphersuite: Ciphersuite): E2eiEnrollment

See core_crypto::transaction_context::TransactionContext::e2ei_new_activation_enrollment

Link copied to clipboard
abstract suspend fun e2eiNewEnrollment(clientId: String, displayName: String, handle: String, team: String?, expirySec: UInt, ciphersuite: Ciphersuite): E2eiEnrollment

See core_crypto::transaction_context::TransactionContext::e2ei_new_enrollment

Link copied to clipboard
abstract suspend fun e2eiNewRotateEnrollment(displayName: String?, handle: String?, team: String?, expirySec: UInt, ciphersuite: Ciphersuite): E2eiEnrollment

See core_crypto::transaction_context::TransactionContext::e2ei_new_rotate_enrollment

Link copied to clipboard
abstract suspend fun e2eiRegisterAcmeCa(trustAnchorPem: String)

See core_crypto::transaction_context::TransactionContext::e2ei_register_acme_ca

Link copied to clipboard
abstract suspend fun e2eiRegisterCrl(crlDp: String, crlDer: ByteArray): CrlRegistration

See core_crypto::transaction_context::TransactionContext::e2ei_register_crl

Link copied to clipboard
abstract suspend fun e2eiRegisterIntermediateCa(certPem: String): List<String>?

See core_crypto::transaction_context::TransactionContext::e2ei_register_intermediate_ca_pem

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

See core_crypto::mls::conversation::ConversationGuard::e2ei_rotate

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

See core_crypto::mls::conversation::ConversationGuard::enable_history_sharing

Link copied to clipboard
abstract suspend fun encryptMessage(conversationId: ConversationId, message: ByteArray): ByteArray

See core_crypto::mls::conversation::ConversationGuard::encrypt_message

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

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 getData(): ByteArray?

See core_crypto::transaction_context::TransactionContext::get_data

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): ExternalSenderKey

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 joinByExternalCommit(groupInfo: GroupInfo, customConfiguration: CustomConfiguration, credentialType: CredentialType): WelcomeBundle

See core_crypto::transaction_context::TransactionContext::join_by_external_commit

Link copied to clipboard
abstract suspend fun markConversationAsChildOf(childId: ConversationId, parentId: ConversationId)

See core_crypto::mls::conversation::ConversationGuard::mark_as_child_of

Link copied to clipboard
abstract suspend fun mlsInit(clientId: ClientId, ciphersuites: List<Ciphersuite>)

See core_crypto::transaction_context::TransactionContext::mls_init

Link copied to clipboard
abstract suspend fun processWelcomeMessage(welcomeMessage: Welcome, customConfiguration: CustomConfiguration): WelcomeBundle

See core_crypto::transaction_context::TransactionContext::process_raw_welcome_message

Link copied to clipboard
abstract suspend fun proteusDecrypt(sessionId: String, ciphertext: ByteArray): ByteArray

See core_crypto::transaction_context::TransactionContext::proteus_decrypt

Link copied to clipboard
abstract suspend fun proteusDecryptSafe(sessionId: String, ciphertext: ByteArray): ByteArray

Decrypt a message whether or not the proteus session already exists, and saves the session.

Link copied to clipboard
abstract suspend fun proteusEncrypt(sessionId: String, plaintext: ByteArray): ByteArray

See core_crypto::transaction_context::TransactionContext::proteus_encrypt

Link copied to clipboard
abstract suspend fun proteusEncryptBatched(sessions: List<String>, plaintext: ByteArray): Map<String, ByteArray>

See core_crypto::transaction_context::TransactionContext::proteus_encrypt_batched

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

See core_crypto::transaction_context::TransactionContext::proteus_fingerprint

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

See core_crypto::transaction_context::TransactionContext::proteus_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::transaction_context::TransactionContext::proteus_fingerprint_remote

Link copied to clipboard
abstract suspend fun proteusInit()

See core_crypto::proteus::ProteusCentral::try_new

Link copied to clipboard
abstract suspend fun proteusLastResortPrekey(): ByteArray

See core_crypto::transaction_context::TransactionContext::proteus_last_resort_prekey

Link copied to clipboard

See core_crypto::proteus::ProteusCentral::last_resort_prekey_id

Link copied to clipboard
abstract suspend fun proteusNewPrekey(prekeyId: UShort): ByteArray

Creates a new Proteus prekey with the given id and returns the CBOR-serialized version of the prekey bundle

Link copied to clipboard

Creates a new Proteus prekey with an automatically incremented ID and returns the CBOR-serialized version of the prekey bundle

Link copied to clipboard
abstract suspend fun proteusReloadSessions()

See core_crypto::transaction_context::TransactionContext::proteus_reload_sessions

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

See core_crypto::transaction_context::TransactionContext::proteus_session_delete

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

See core_crypto::transaction_context::TransactionContext::proteus_session_exists

Link copied to clipboard
abstract suspend fun proteusSessionFromMessage(sessionId: String, envelope: ByteArray): ByteArray

See core_crypto::transaction_context::TransactionContext::proteus_session_from_message

Link copied to clipboard
abstract suspend fun proteusSessionFromPrekey(sessionId: String, prekey: ByteArray)

See core_crypto::transaction_context::TransactionContext::proteus_session_from_prekey

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

See core_crypto::transaction_context::TransactionContext::proteus_session_save

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

See core_crypto::Session::random_bytes.

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

See core_crypto::mls::conversation::ConversationGuard::remove_members

Link copied to clipboard
abstract suspend fun saveX509Credential(enrollment: E2eiEnrollment, certificateChain: String): List<String>?

See core_crypto::transaction_context::TransactionContext::save_x509_credential

Link copied to clipboard
abstract suspend fun setData(data: ByteArray)

See core_crypto::transaction_context::TransactionContext::set_data

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

See core_crypto::mls::conversation::ConversationGuard::update_key_material

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

See core_crypto::mls::conversation::ConversationGuard::wipe