SandboxedKeychainStorage
@objc(VSSSandboxedKeychainStorage)
public final class SandboxedKeychainStorage : NSObject
extension SandboxedKeychainStorage: KeychainStorageProtocol
KeychainStorage that sandboxes entries using identity and prefix
-
Underlying key storage
Declaration
Swift
public let keychainStorage: KeychainStorageProtocol -
User’s identity
Declaration
Swift
@objc public let identity: String? -
Entries’ name prefix
Declaration
Swift
@objc public let prefix: String? -
Init
Declaration
Swift
public init(identity: String? = nil, prefix: String? = nil, keychainStorage: KeychainStorageProtocol)Parameters
identityUser’s identity
prefixEntries’ name prefix
keychainStorageKeychainStorage used to store keys
-
Stores key in Keychain
Throws
- Rethrows from
KeychainStorage errorConvertingKeychainEntry
Declaration
Swift
@objc public func store(data: Data, withName name: String, meta: [String : String]?) throws -> KeychainEntryParameters
dataData
nameName
metaMeta
Return Value
Stored Keychain entry
- Rethrows from
-
Updates entry
Declaration
Swift
@objc public func updateEntry(withName name: String, data: Data, meta: [String : String]?) throwsParameters
nameName
dataNew data
metaNew meta
-
Retrieves entry from Keychain
Throws
- Rethrows from
KeychainStorage errorConvertingKeychainEntry
Declaration
Swift
@objc public func retrieveEntry(withName name: String) throws -> KeychainEntryParameters
nameName
Return Value
Retrieved Keychain entry
- Rethrows from
-
Retrieves all entries from Keychain
Throws
- Rethrows from
KeychainStorage errorConvertingKeychainEntry
Declaration
Swift
@objc public func retrieveAllEntries() throws -> [KeychainEntry]Return Value
All Keychain entries
- Rethrows from
-
Deletes keychain entry
Throws
Rethrows fromKeychainStorageDeclaration
Swift
@objc public func deleteEntry(withName name: String) throwsParameters
nameName
-
Checks if entry exists in Keychain
Throws
Rethrows fromKeychainStorageDeclaration
Swift
public func existsEntry(withName name: String) throws -> BoolParameters
nameName
Return Value
true if entry exists, false - otherwise
SandboxedKeychainStorage Class Reference