CoreCryptoProtocol
public protocol CoreCryptoProtocol : AnyObject, Sendable
Undocumented
-
canClose()
AsynchronousSee [Session::can_close]
Declaration
Swift
func canClose() async -> Bool
-
clientPublicKey(ciphersuite:
AsynchronouscredentialType: ) See [core_crypto::transaction_context::TransactionContext::client_public_key]
Declaration
Swift
func clientPublicKey(ciphersuite: Ciphersuite, credentialType: CredentialType) async throws -> Data
-
conversationCiphersuite(conversationId:
Asynchronous) See [core_crypto::mls::conversation::Conversation::ciphersuite]
Declaration
Swift
func conversationCiphersuite(conversationId: ConversationId) async throws -> Ciphersuite
-
conversationEpoch(conversationId:
Asynchronous) See [core_crypto::mls::conversation::Conversation::epoch]
Declaration
Swift
func conversationEpoch(conversationId: ConversationId) async throws -> UInt64
-
conversationExists(conversationId:
Asynchronous) See [core_crypto::prelude::Session::conversation_exists]
Declaration
Swift
func conversationExists(conversationId: ConversationId) async throws -> Bool
-
e2eiIsEnabled(ciphersuite:
Asynchronous) See [core_crypto::prelude::Session::e2ei_is_enabled]
Declaration
Swift
func e2eiIsEnabled(ciphersuite: Ciphersuite) async throws -> Bool
-
e2eiIsPkiEnvSetup()
AsynchronousSee [core_crypto::prelude::Session::e2ei_is_pki_env_setup]
Declaration
Swift
func e2eiIsPkiEnvSetup() async -> Bool
-
exportSecretKey(conversationId:
AsynchronouskeyLength: ) See [core_crypto::mls::conversation::Conversation::export_secret_key]
Declaration
Swift
func exportSecretKey(conversationId: ConversationId, keyLength: UInt32) async throws -> Data
-
getClientIds(conversationId:
Asynchronous) See [core_crypto::mls::conversation::Conversation::get_client_ids]
Declaration
Swift
func getClientIds(conversationId: ConversationId) async throws -> [ClientId]
-
getDeviceIdentities(conversationId:
AsynchronousdeviceIds: ) See [core_crypto::mls::conversation::Conversation::get_device_identities]
Declaration
Swift
func getDeviceIdentities(conversationId: ConversationId, deviceIds: [ClientId]) async throws -> [WireIdentity]
-
getExternalSender(conversationId:
Asynchronous) See [core_crypto::mls::conversation::Conversation::get_external_sender]
Declaration
Swift
func getExternalSender(conversationId: ConversationId) async throws -> Data
-
getUserIdentities(conversationId:
AsynchronoususerIds: ) See [core_crypto::mls::conversation::Conversation::get_user_identities]
Declaration
Swift
func getUserIdentities(conversationId: ConversationId, userIds: [String]) async throws -> [String : [WireIdentity]]
-
isHistorySharingEnabled(conversationId:
Asynchronous) See [core_crypto::mls::conversation::Conversation::is_history_sharing_enabled]
Declaration
Swift
func isHistorySharingEnabled(conversationId: ConversationId) async throws -> Bool
-
proteusFingerprint()
AsynchronousSee [core_crypto::proteus::ProteusCentral::fingerprint]
Declaration
Swift
func proteusFingerprint() async throws -> String
-
proteusFingerprintLocal(sessionId:
Asynchronous) See [core_crypto::proteus::ProteusCentral::fingerprint_local]
Declaration
Swift
func proteusFingerprintLocal(sessionId: String) async throws -> String
-
See [core_crypto::proteus::ProteusCentral::fingerprint_prekeybundle]
Declaration
Swift
func proteusFingerprintPrekeybundle(prekey: Data) throws -> String
-
proteusFingerprintRemote(sessionId:
Asynchronous) See [core_crypto::proteus::ProteusCentral::fingerprint_remote]
Declaration
Swift
func proteusFingerprintRemote(sessionId: String) async throws -> String
-
See [core_crypto::proteus::ProteusCentral::last_resort_prekey_id]
Declaration
Swift
func proteusLastResortPrekeyId() throws -> UInt16
-
proteusSessionExists(sessionId:
Asynchronous) See [core_crypto::proteus::ProteusCentral::session_exists]
Declaration
Swift
func proteusSessionExists(sessionId: String) async throws -> Bool
-
provideTransport(callbacks:
Asynchronous) See [core_crypto::prelude::Session::provide_transport]
Declaration
Swift
func provideTransport(callbacks: MlsTransport) async throws
-
randomBytes(len:
Asynchronous) See [core_crypto::prelude::Session::random_bytes]
Declaration
Swift
func randomBytes(len: UInt32) async throws -> Data
-
registerEpochObserver(epochObserver:
Asynchronous) Add an epoch observer to this client.
This function should be called 0 or 1 times in a session’s lifetime. If called when an epoch observer already exists, this will return an error.
Declaration
Swift
func registerEpochObserver(epochObserver: EpochObserver) async throws
-
registerHistoryObserver(historyObserver:
Asynchronous) Add a history observer to this client.
This function should be called 0 or 1 times in a session’s lifetime. If called when an history observer already exists, this will return an error.
Declaration
Swift
func registerHistoryObserver(historyObserver: HistoryObserver) async throws
-
reseedRng(seed:
Asynchronous) see [core_crypto::prelude::Session::reseed]
Declaration
Swift
func reseedRng(seed: Data) async throws
-
transaction(command:
Asynchronous) 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.
When calling this function from within Rust, async functions accepting a context implement
CoreCryptoCommand
, so operations can be defined inline as follows:core_crypto.transaction(Arc::new(async |context| { // your implementation here Ok(()) }))?;
Declaration
Swift
func transaction(command: CoreCryptoCommand) async throws