Functions

The following functions are available globally.

  • Undocumented

    Declaration

    Swift

    public func uniffiForeignFutureHandleCountCoreCryptoFfi() -> Int
  • buildMetadata() From WireCoreCryptoUniffi

    Returns build data for CoreCrypto

    Declaration

    Swift

    public func buildMetadata() -> BuildMetadata
  • ciphersuiteDefault() From WireCoreCryptoUniffi

    Get 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
  • 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 -> CoreCryptoFfi
  • coreCryptoNew(database:) Asynchronous, from WireCoreCryptoUniffi

    Free function to construct a new CoreCryptoFfi instance.

    This is necessary because in uniffi async constructors are not supported.

    MLS or proteus can be initialized with [core_crypto::transaction_context::TransactionContext::mls_init] or [core_crypto::transaction_context::TransactionContext::proteus_init], respectively.

    Declaration

    Swift

    public func coreCryptoNew(database: Database) async throws -> CoreCryptoFfi
  • inMemoryDatabase(key:) Asynchronous, from WireCoreCryptoUniffi

    Create an in-memory [Database] whose data will be lost when the instance is dropped.

    Declaration

    Swift

    public func inMemoryDatabase(key: DatabaseKey) async throws -> Database
  • migrateDatabaseKeyTypeToBytes(path:oldKey:newKey:) Asynchronous, from WireCoreCryptoUniffi

    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:key:) Asynchronous, from WireCoreCryptoUniffi

    Open or create a [Database].

    Declaration

    Swift

    public func openDatabase(name: String, key: DatabaseKey) async throws -> Database
  • setLogger(logger:) From WireCoreCryptoUniffi

    Initializes the logger

    Declaration

    Swift

    public func setLogger(logger: CoreCryptoLogger)
  • setMaxLogLevel(level:) From WireCoreCryptoUniffi

    Set maximum log level forwarded to the logger

    Declaration

    Swift

    public func setMaxLogLevel(level: CoreCryptoLogLevel)
  • updateDatabaseKey(name:oldKey:newKey:) Asynchronous, from WireCoreCryptoUniffi

    Updates the key of the CoreCrypto database.

    Declaration

    Swift

    public func updateDatabaseKey(name: String, oldKey: DatabaseKey, newKey: DatabaseKey) async throws
  • version() From WireCoreCryptoUniffi

    The version of core-crypto.

    Declaration

    Swift

    public func version() -> String
  • uniffiEnsureCoreCryptoFfiInitialized() From WireCoreCryptoUniffi

    Undocumented

    Declaration

    Swift

    public func uniffiEnsureCoreCryptoFfiInitialized()