KeychainStorageProtocol
public protocol KeychainStorageProtocol : AnyObject
Protocol with Keychain operations
-
Stores key in Keychain
Throws
Depends on implementationDeclaration
Swift
func store(data: Data, withName name: String, meta: [String : String]?) throws -> KeychainEntry
Parameters
data
Data
name
Name
meta
Meta
Return Value
Stored Keychain entry
-
Updates entry
Throws
Depends on implementationDeclaration
Swift
func updateEntry(withName name: String, data: Data, meta: [String : String]?) throws
Parameters
name
Name
data
New data
meta
New meta
-
Retrieves entry from Keychain
Throws
Depends on implementationDeclaration
Swift
func retrieveEntry(withName name: String) throws -> KeychainEntry
Parameters
name
Name
Return Value
Retrieved Keychain entry
-
Retrieves all entries from Keychain
Throws
Depends on implementationDeclaration
Swift
func retrieveAllEntries() throws -> [KeychainEntry]
Return Value
All Keychain entries
-
Deletes keychain entry
Throws
Depends on implementationDeclaration
Swift
func deleteEntry(withName name: String) throws
Parameters
name
Name
-
Checks if entry exists in Keychain
Throws
Depends on implementationDeclaration
Swift
func existsEntry(withName name: String) throws -> Bool
Parameters
name
Name
Return Value
true if entry exists, false - otherwise