Index

RBKeyChainCenter.swift

Classes


RBKeyChainCenter

Provides access to the key chain.

Functions

Updates or creates the account with the given name using the given raw data.
@param account : The name of the account to create or update.
@param data : The data to associate with the account.
@returns Whether or not the operation was successful.
public class func addOrUpdateAccount(_ account: String, with data: Data) -> Bool

Checks whether or not an account exists with the given name.
@param account : The name of the account to check exists.
@returns Whether or not the account was found.
public class func accountExists(_ account: String) -> Bool

Deletes an account with the given name.
@param account : The name of the account to delete.
@returns Whether or not the operation was successful.
public class func deleteAccount(_ account: String) -> Bool

Retrieves all of the available key chain accounts.
@returns An array of account Dictionary objects.
public class func getAllAccounts() -> [Any]?

Retrieves the key chain account with the given name.
@param account : The name of the account to retrieve.
@returns The account NSDictionary, or nil if the account was not found.
public class func getAccount(_ account: String) -> [AnyHashable: Any]?

Retrieves the raw data for the account with the given name.
@param account : The name of the account for which to retrieve the data.
@returns The raw data of the account, or nil if the account was not found.
public class func getAccountData(_ account: String) -> Data?

Deletes all of the key chain accounts.
@returns Whether or not the operation was successful.
public class func deleteAllAccounts() -> Bool