KeychainLongTermKeysStorage
@objc(VSRKeychainLongTermKeysStorage)
open class KeychainLongTermKeysStorage : NSObject, LongTermKeysStorage
Long-term keys storage
-
Initializer
Throws
Rethrows fromKeychainStorageParamsDeclaration
Swift
@objc public init(identity: String, params: KeychainStorageParams? = nil) throwsParameters
identityidentity of this user
paramsoptional custom parameters for KeychainStorage setup
-
Stores key
Throws
KeychainLongTermKeysStorageError.invalidKeyId- Rethrows from
SandboxedKeychainStorage
Declaration
Swift
public func storeKey(_ key: Data, withId id: Data) throwsParameters
keyprivate key
idkey id
-
Retrieves key
Throws
KeychainLongTermKeysStorageError.invalidKeyId- Rethrows from
SandboxedKeychainStorage
Declaration
Swift
public func retrieveKey(withId id: Data) throws -> LongTermKeyParameters
idkey id
Return Value
Long-term key
-
Deletes key
Throws
Rethrows fromSandboxedKeychainStorageDeclaration
Swift
public func deleteKey(withId id: Data) throwsParameters
idkey id
-
Retrieves all persistent long-term keys
Throws
KeychainLongTermKeysStorageError.invalidKeyId- Rethrows from
SandboxedKeychainStorage
Declaration
Swift
public func retrieveAllKeys() throws -> [LongTermKey]Return Value
Long-term keys list
-
Marks key as outdated
Throws
KeychainLongTermKeysStorageError.invalidMeta- Rethrows from
SandboxedKeychainStorage
Declaration
Swift
public func markKeyOutdated(startingFrom date: Date, keyId: Data) throwsParameters
datedate from which this key started to be outdated
keyIdkey id
-
Deletes all long-term keys
Throws
Rethrows fromSandboxedKeychainStorageDeclaration
Swift
public func reset() throws
KeychainLongTermKeysStorage Class Reference