RBKeyChainCenter Class Reference

Inherits from NSObject
Declared in RBKeyChainCenter.h

Overview

Provides access to the key chain.

+ getAllAccounts

Retrieves all of the available key chain accounts.

+ (nullable NSArray *)getAllAccounts

Return Value

An array of account NSDictionary objects.

Declared In

RBKeyChainCenter.h

+ deleteAccount:

Deletes an account with the given name.

+ (BOOL)deleteAccount:(nonnull NSString *)account

Parameters

account

The name of the account to delete.

Return Value

Whether or not the operation was successful.

Declared In

RBKeyChainCenter.h

+ accountExists:

Checks whether or not an account exists with the given name.

+ (BOOL)accountExists:(nonnull NSString *)account

Parameters

account

The name of the account to check exists.

Return Value

Whether or not the account was found.

Declared In

RBKeyChainCenter.h

+ getAccount:

Retrieves the key chain account with the given name.

+ (nullable NSDictionary *)getAccount:(nonnull NSString *)account

Parameters

account

The name of the account to retrieve.

Return Value

The account NSDictionary, or nil if the account was not found.

Declared In

RBKeyChainCenter.h

+ getAccountData:

Retrieves the raw data for the account with the given name.

+ (nullable NSData *)getAccountData:(nonnull NSString *)account

Parameters

account

The name of the account for which to retrieve the data.

Return Value

The raw data of the account, or nil if the account was not found.

Declared In

RBKeyChainCenter.h

+ addOrUpdateAccount:withData:

Updates or creates the account with the given name using the given raw data.

+ (BOOL)addOrUpdateAccount:(nonnull NSString *)account withData:(nonnull NSData *)data

Parameters

account

The name of the account to create or update.

data

The data to associate with the account.

Return Value

Whether or not the operation was successful.

Declared In

RBKeyChainCenter.h

+ deleteAllAccounts

Deletes all of the key chain accounts.

+ (BOOL)deleteAllAccounts

Return Value

Whether or not the operation was successful.

Declared In

RBKeyChainCenter.h

+ printStatus:

Prints the given status value to the console.

+ (void)printStatus:(OSStatus)status

Parameters

status

The status value to print.

Declared In

RBKeyChainCenter.h