Database
open class Database : DatabaseProtocol, @unchecked Sendable
The database acting as a core crypto keystore.
-
getLocation()AsynchronousGet the location of the database Returns null if in-memory
Declaration
Swift
open func getLocation() async throws -> String? -
open(location:Asynchronous, from WireCoreCryptokey: ) Initialise or open a Database.
Declaration
Swift
public static func open(location: String, key: DatabaseKey) async throws -> DatabaseParameters
locationpath to the database
keysecret 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 -> DatabaseParameters
keysecret key to unlock the database