createVault

Creates a new secure store (a vault).

A unique name is assigned, and after creation, the vault is referenced and accessed by that name. This method also assigns a password and salt value to the vault. If a vault with the same name already exists, this method throws an exception. A newly created vault is in the unlocked state.

Syntax

+ (SUPDataVault*)createVault:(NSString*)name withPassword:(NSString*)password withSalt:(NSString*)salt;

Parameters

Returns

Returns the newly created instance of the DataVault with the provided ID. The returned DataVault is in the unlocked state with default configuration values. To change the default configuration values, you can immediately call the "set" methods for the values you want to change.

If a vault already exists with the same name, a SUPDataVaultException is thrown with the reason kDataVaultExceptionReasonAlreadyExists.

Examples