KeychainStorage
@objc(VSSKeychainStorage)
open class KeychainStorage : NSObject
extension KeychainStorage: KeychainStorageProtocol
Class responsible for Keychain interactions.
-
Comment for all macOS password entries created by this class. Used for filtering
Declaration
Swift
@objc public static let commentStringPrefix: String -
Comment string
Declaration
Swift
@objc public func commentString() -> StringReturn Value
Comment string for macOS Keychain entries
-
Created access for trusted application + current application
Throws
KeychainStorageErrorDeclaration
Swift
@objc public func createAccess(forName name: String, queryOptions: KeychainQueryOptions) throws -> SecAccessParameters
nameentry name
Return Value
SecAccess
-
Undocumented
Declaration
Swift
@objc public func createAccessControl() throws -> SecAccessControl -
Private key identifier format
Declaration
Swift
@objc public static let privateKeyIdentifierFormat: String -
KeychainStorage parameters
Declaration
Swift
@objc public let storageParams: KeychainStorageParams -
Initializer
Declaration
Swift
@objc public init(storageParams: KeychainStorageParams)Parameters
storageParamsKeychainStorage parameters
-
Stores sensitive data to Keychain
Throws
KeychainStorageErrorDeclaration
Swift
@objc open func store(data: Data, withName name: String, meta: [String: String]?, queryOptions: KeychainQueryOptions?) throws -> KeychainEntryParameters
dataSensitive data
nameAlias for data
metaAdditional meta info
Return Value
Stored entry
-
Updated entry in Keychain
Throws
KeychainStorageErrorDeclaration
Swift
@objc open func updateEntry(withName name: String, data: Data, meta: [String: String]?, queryOptions: KeychainQueryOptions?) throwsParameters
nameAlias
dataNew data
metaNew meta info
-
Retrieves entry from keychain
Throws
KeychainStorageErrorDeclaration
Swift
@objc open func retrieveEntry(withName name: String, queryOptions: KeychainQueryOptions?) throws -> KeychainEntryParameters
nameAlias
Return Value
Retrieved entry
-
Retrieves all entries in Keychain
Throws
KeychainStorageErrorDeclaration
Swift
@objc open func retrieveAllEntries(queryOptions: KeychainQueryOptions?) throws -> [KeychainEntry]Return Value
Retrieved entries
-
Deletes entry from Keychain
Throws
KeychainStorageErrorDeclaration
Swift
@objc open func deleteEntry(withName name: String, queryOptions: KeychainQueryOptions?) throwsParameters
nameAlias
-
Deletes all entries from Keychain
Throws
KeychainStorageErrorDeclaration
Swift
@objc open func deleteAllEntries(queryOptions: KeychainQueryOptions? = nil) throws -
Checks if entry exists in Keychain
Throws
KeychainStorageErrorDeclaration
Swift
public func existsEntry(withName name: String, queryOptions: KeychainQueryOptions?) throws -> BoolParameters
nameAlias
Return Value
true if entry exists, false otherwise
-
Declaration
Swift
public func retrieveAllEntries() throws -> [KeychainEntry] -
Declaration
Swift
public func deleteEntry(withName name: String) throws -
Declaration
Swift
public func existsEntry(withName name: String) throws -> Bool -
Declaration
Swift
public func retrieveEntry(withName name: String) throws -> KeychainEntry -
Declaration
Swift
public func updateEntry(withName name: String, data: Data, meta: [String : String]?) throws -
Declaration
Swift
public func store(data: Data, withName name: String, meta: [String : String]?) throws -> KeychainEntry
KeychainStorage Class Reference