CoreCrypto
open class CoreCrypto : CoreCryptoProtocol, @unchecked Sendable
Undocumented
-
canClose()
AsynchronousSee [Session::can_close]
Declaration
Swift
open func canClose() async -> Bool
-
clientPublicKey(ciphersuite:
AsynchronouscredentialType: ) See [core_crypto::transaction_context::TransactionContext::client_public_key]
Declaration
Swift
open func clientPublicKey(ciphersuite: Ciphersuite, credentialType: CredentialType) async throws -> Data
-
conversationCiphersuite(conversationId:
Asynchronous) See [core_crypto::mls::conversation::Conversation::ciphersuite]
Declaration
Swift
open func conversationCiphersuite(conversationId: ConversationId) async throws -> Ciphersuite
-
conversationEpoch(conversationId:
Asynchronous) See [core_crypto::mls::conversation::Conversation::epoch]
Declaration
Swift
open func conversationEpoch(conversationId: ConversationId) async throws -> UInt64
-
conversationExists(conversationId:
Asynchronous) See [core_crypto::prelude::Session::conversation_exists]
Declaration
Swift
open func conversationExists(conversationId: ConversationId) async throws -> Bool
-
e2eiIsEnabled(ciphersuite:
Asynchronous) See [core_crypto::prelude::Session::e2ei_is_enabled]
Declaration
Swift
open func e2eiIsEnabled(ciphersuite: Ciphersuite) async throws -> Bool
-
e2eiIsPkiEnvSetup()
AsynchronousSee [core_crypto::prelude::Session::e2ei_is_pki_env_setup]
Declaration
Swift
open func e2eiIsPkiEnvSetup() async -> Bool
-
exportSecretKey(conversationId:
AsynchronouskeyLength: ) See [core_crypto::mls::conversation::Conversation::export_secret_key]
Declaration
Swift
open func exportSecretKey(conversationId: ConversationId, keyLength: UInt32) async throws -> Data
-
getClientIds(conversationId:
Asynchronous) See [core_crypto::mls::conversation::Conversation::get_client_ids]
Declaration
Swift
open func getClientIds(conversationId: ConversationId) async throws -> [ClientId]
-
getDeviceIdentities(conversationId:
AsynchronousdeviceIds: ) See [core_crypto::mls::conversation::Conversation::get_device_identities]
Declaration
Swift
open func getDeviceIdentities(conversationId: ConversationId, deviceIds: [ClientId]) async throws -> [WireIdentity]
-
getExternalSender(conversationId:
Asynchronous) See [core_crypto::mls::conversation::Conversation::get_external_sender]
Declaration
Swift
open func getExternalSender(conversationId: ConversationId) async throws -> Data
-
getUserIdentities(conversationId:
AsynchronoususerIds: ) See [core_crypto::mls::conversation::Conversation::get_user_identities]
Declaration
Swift
open 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
open func isHistorySharingEnabled(conversationId: ConversationId) async throws -> Bool
-
proteusFingerprint()
AsynchronousSee [core_crypto::proteus::ProteusCentral::fingerprint]
Declaration
Swift
open func proteusFingerprint() async throws -> String
-
proteusFingerprintLocal(sessionId:
Asynchronous) See [core_crypto::proteus::ProteusCentral::fingerprint_local]
Declaration
Swift
open func proteusFingerprintLocal(sessionId: String) async throws -> String
-
See [core_crypto::proteus::ProteusCentral::fingerprint_prekeybundle]
Declaration
Swift
open func proteusFingerprintPrekeybundle(prekey: Data) throws -> String
-
proteusFingerprintRemote(sessionId:
Asynchronous) See [core_crypto::proteus::ProteusCentral::fingerprint_remote]
Declaration
Swift
open func proteusFingerprintRemote(sessionId: String) async throws -> String
-
See [core_crypto::proteus::ProteusCentral::last_resort_prekey_id]
Declaration
Swift
open func proteusLastResortPrekeyId() throws -> UInt16
-
proteusSessionExists(sessionId:
Asynchronous) See [core_crypto::proteus::ProteusCentral::session_exists]
Declaration
Swift
open func proteusSessionExists(sessionId: String) async throws -> Bool
-
provideTransport(callbacks:
Asynchronous) See [core_crypto::prelude::Session::provide_transport]
Declaration
Swift
open func provideTransport(callbacks: MlsTransport) async throws
-
randomBytes(len:
Asynchronous) See [core_crypto::prelude::Session::random_bytes]
Declaration
Swift
open 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
open 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
open func registerHistoryObserver(historyObserver: HistoryObserver) async throws
-
reseedRng(seed:
Asynchronous) see [core_crypto::prelude::Session::reseed]
Declaration
Swift
open 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
open func transaction(command: CoreCryptoCommand) async throws