EMPropertyStorage Protocol Reference

Conforms to NSObject
Declared in EMPropertyStorage.h

Overview

Interface of the secure storage object. See EMSecureStorageManager to query secure storage objects.

Note:
Before calling any method of EMPropertyStorage, make sure you have already logged in to password manager first. See EMPasswordManager.

– open: required method

Opens a storage. This has to be called before retrieving or updating the data in the storage.

- (BOOL)open:(NSError **)anError

Parameters

anError

If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in NULL.

Return Value

YES if opening succeeds, NO otherwise.

Availability

3.1

Declared In

EMPropertyStorage.h

– close: required method

Closes a storage.

- (BOOL)close:(NSError **)anError

Parameters

anError

If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in NULL.

Return Value

YES if closing succeeds, NO otherwise.

Availability

3.1

Declared In

EMPropertyStorage.h

– isOpen required method

Checks if the storage is open.

- (BOOL)isOpen

Return Value

YES if open, NO otherwise.

Availability

3.1

Declared In

EMPropertyStorage.h

– allKeys: required method

Gets the set of keys for all the data stored in the storage.

- (NSSet *)allKeys:(NSError **)anError

Parameters

anError

If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in NULL.

Return Value

Set of keys in the secure storage; an empty set if contains no key-value; nil if an error occurs.

Availability

3.1

Declared In

EMPropertyStorage.h

– hasPropertyWithKey:error: required method

Check if an entry with the given key exist in the storage.

- (BOOL)hasPropertyWithKey:(NSData *)key error:(NSError **)anError

Parameters

key

the identifier of a property.

anError

If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in NULL.

Return Value

YES if property exists, NO if not exist or some error occured.

Availability

3.1

Declared In

EMPropertyStorage.h

– setProperty:forKey:wipeValue:error: required method

Sets a property into the storage.

- (BOOL)setProperty:(id<EMSecureByteArray>)property forKey:(NSData *)key wipeValue:(BOOL)wipeValue error:(NSError **)anError

Parameters

property

The property value. Should not be nil.

key

The key. Should not be nil.

wipeValue

If YES immediately wipes the property value after calling the method.

anError

If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in NULL.

Return Value

YES if stored successfully, NO otherwise.

Availability

3.1

Declared In

EMPropertyStorage.h

– propertyForKey:error: required method

Gets property from the storage.

- (id<EMSecureByteArray>)propertyForKey:(NSData *)key error:(NSError **)anError

Parameters

key

The key. Should not be nil.

anError

If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in NULL.

Return Value

The property if found, nil if not found or if an error occurs.

Availability

3.1

Declared In

EMPropertyStorage.h

– removePropertyForKey:error: required method

Removes a property with given key.

- (BOOL)removePropertyForKey:(NSData *)key error:(NSError **)anError

Parameters

key

The key. Should not be nil.

anError

If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in NULL.

Return Value

YES if deleted successfully, NO otherwise.

Availability

3.1

Declared In

EMPropertyStorage.h

– removeAllProperties: required method

Removes all the properties from the storage. Results in empty storage but the storage table still exists.

- (BOOL)removeAllProperties:(NSError **)anError

Parameters

anError

If an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in NULL.

Return Value

YES if deleted successfully, NO otherwise.

Availability

3.1

Declared In

EMPropertyStorage.h