SQLiteUserStorage

CLASS

SQLiteUserStorage

@objc public class SQLiteUserStorage: NSObject, UserStorage

Concrete implementation of the UserStorage protocol that implements it with embedded SQLite database. It is fully encrypted with the SQLChiper encryption framework.

Properties

dbName

public var dbName = "miracl"

Methods

loadStorage()

public func loadStorage() throws

add(user:)

public func add(user: AuthenticationUser) throws

Parameters

Name Description
user a user that needs to be added to the storage.

add(signingUser:)

public func add(signingUser: SigningUser) throws

Parameters

Name Description
signingUser a signing user that needs to be added to the storage.

userExists(with:)

public func userExists(with userId: String) -> Bool

Parameters

Name Description
userId a user id to be checked in the storage.

signingUserExists(with:)

public func signingUserExists(with userId: String) -> Bool

Parameters

Name Description
userId a signing user id to be checked in the storage.

authenticationUsers()

public func authenticationUsers() -> [AuthenticationUser]

signingUsers()

public func signingUsers() -> [SigningUser]

deleteUser(by:)

public func deleteUser(by user: AuthenticationUser) -> Bool

Parameters

Name Description
user an authentication user that needs to be added to the storage.

deleteSigningUser(by:)

public func deleteSigningUser(by signingUser: SigningUser) -> Bool

Parameters

Name Description
signingUser the signing user that has to be deleted.