Functions
The following functions are available globally.
-
migrateDatabaseKeyTypeToBytes(path:
Asynchronous, from WireCoreCryptooldKey: newKey: ) Undocumented
Declaration
Swift
public func migrateDatabaseKeyTypeToBytes(path: String, oldKey: String, newKey: DatabaseKey) async throws
-
uniffiForeignFutureHandleCountCoreCryptoFfi()
From WireCoreCryptoUniffiUndocumented
Declaration
Swift
public func uniffiForeignFutureHandleCountCoreCryptoFfi() -> Int
-
buildMetadata()
From WireCoreCryptoUniffiReturns build data for CoreCrypto
Declaration
Swift
public func buildMetadata() -> BuildMetadata
-
ciphersuiteDefault()
From WireCoreCryptoUniffiUndocumented
Declaration
Swift
public func ciphersuiteDefault() -> Ciphersuite
-
ciphersuiteFromU16(discriminant:
From WireCoreCryptoUniffi) Undocumented
Declaration
Swift
public func ciphersuiteFromU16(discriminant: UInt16) throws -> Ciphersuite
-
coreCryptoDeferredInit(path:
Asynchronous, from WireCoreCryptoUniffikey: entropySeed: ) Free function to construct a new
CoreCrypto
instance.Similar to [
core_crypto_new
] but defers MLS initialization. It can be initialized later with [core_crypto::transaction_context::TransactionContext::mls_init].Declaration
Swift
public func coreCryptoDeferredInit(path: String, key: DatabaseKey, entropySeed: Data?) async throws -> CoreCrypto
-
coreCryptoHistoryClient(historySecret:
Asynchronous, from WireCoreCryptoUniffi) Instantiate a history client.
This client exposes the full interface of
CoreCrypto
, but it should only be used to decrypt messages. Other use is a logic error.Declaration
Swift
public func coreCryptoHistoryClient(historySecret: HistorySecret) async throws -> CoreCrypto
-
coreCryptoNew(path:
Asynchronous, from WireCoreCryptoUniffikey: clientId: ciphersuites: entropySeed: nbKeyPackage: ) Free function to construct a new
CoreCrypto
instance.This is necessary because in uniffi async constructors are not supported.
See [Session::try_new]
Declaration
Swift
public func coreCryptoNew(path: String, key: DatabaseKey, clientId: ClientId, ciphersuites: [Ciphersuite], entropySeed: Data?, nbKeyPackage: UInt32?) async throws -> CoreCrypto
-
migrateDbKeyTypeToBytes(name:
Asynchronous, from WireCoreCryptoUniffioldKey: newKey: ) Updates the key of the CoreCrypto database. To be used only once, when moving from CoreCrypto <= 5.x to CoreCrypto 6.x.
Declaration
Swift
public func migrateDbKeyTypeToBytes(name: String, oldKey: String, newKey: DatabaseKey) async throws
-
setLogger(logger:
From WireCoreCryptoUniffilevel: ) Initializes the logger
NOTE: in a future release we will remove
level
argument.Declaration
Swift
public func setLogger(logger: CoreCryptoLogger, level: CoreCryptoLogLevel)
-
setLoggerOnly(logger:
From WireCoreCryptoUniffi) Initializes the logger
Declaration
Swift
public func setLoggerOnly(logger: CoreCryptoLogger)
-
setMaxLogLevel(level:
From WireCoreCryptoUniffi) Set maximum log level forwarded to the logger
Declaration
Swift
public func setMaxLogLevel(level: CoreCryptoLogLevel)
-
version()
From WireCoreCryptoUniffiUndocumented
Declaration
Swift
public func version() -> String
-
uniffiEnsureCoreCryptoFfiInitialized()
From WireCoreCryptoUniffiUndocumented
Declaration
Swift
public func uniffiEnsureCoreCryptoFfiInitialized()