Database

open class Database : DatabaseProtocol, @unchecked Sendable

The database acting as a core crypto keystore.

  • getLocation() Asynchronous

    Get the location of the database Returns null if in-memory

    Declaration

    Swift

    open func getLocation() async throws -> String?
  • open(location:key:) Asynchronous, from WireCoreCrypto

    Initialise or open a Database.

    Declaration

    Swift

    public static func open(location: String, key: DatabaseKey) async throws -> Database

    Parameters

    location

    path to the database

    key

    secret key to unlock the database

  • open(key:) Asynchronous, from WireCoreCrypto

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

    Declaration

    Swift

    public static func open(key: DatabaseKey) async throws -> Database

    Parameters

    key

    secret key to unlock the database