Functions
The following functions are available globally.
- 
                  
uniffiForeignFutureHandleCountCoreCryptoFfi()From WireCoreCryptoUniffiUndocumented
Declaration
Swift
public func uniffiForeignFutureHandleCountCoreCryptoFfi() -> Int - 
                  
buildMetadata()From WireCoreCryptoUniffiReturns build data for CoreCrypto
Declaration
Swift
public func buildMetadata() -> BuildMetadata - 
                  
ciphersuiteDefault()From WireCoreCryptoUniffiGet an instance of the default ciphersuite.
Declaration
Swift
public func ciphersuiteDefault() -> Ciphersuite - 
                  
ciphersuiteFromU16(discriminant:From WireCoreCryptoUniffi) Construct a ciphersuite enum instance from its discriminant.
Declaration
Swift
public func ciphersuiteFromU16(discriminant: UInt16) throws -> Ciphersuite - 
                  
coreCryptoDeferredInit(path:Asynchronous, from WireCoreCryptoUniffikey: entropySeed: ) Free function to construct a new
CoreCryptoinstance.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
CoreCryptoinstance.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 - 
                  
migrateDatabaseKeyTypeToBytes(path: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 migrateDatabaseKeyTypeToBytes(path: String, oldKey: String, newKey: DatabaseKey) async throws - 
                  
openDatabase(name:Asynchronous, from WireCoreCryptoUniffikey: ) Open or create a [Database].
Declaration
Swift
public func openDatabase(name: String, key: DatabaseKey) async throws -> Database - 
                  
setLogger(logger:From WireCoreCryptoUniffilevel: ) Initializes the logger
NOTE: in a future release we will remove
levelargument.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) - 
                  
updateDatabaseKey(name:Asynchronous, from WireCoreCryptoUniffioldKey: newKey: ) Updates the key of the CoreCrypto database.
Declaration
Swift
public func updateDatabaseKey(name: String, oldKey: DatabaseKey, newKey: DatabaseKey) async throws - 
                  
version()From WireCoreCryptoUniffiThe version of
core-crypto.Declaration
Swift
public func version() -> String - 
                  
uniffiEnsureCoreCryptoFfiInitialized()From WireCoreCryptoUniffiUndocumented
Declaration
Swift
public func uniffiEnsureCoreCryptoFfiInitialized() 
        Functions  Reference