public final class SharedDataVault extends DataVault
DataVault.DVDataName, DataVault.DVPasswordPolicy
ERR_MSG_INVALID_PARAMETER, ERR_MSG_VAULT_DELETED, ERR_MSG_VAULT_EXISTS, id, lock, LOG_TAG
Modifier and Type | Method and Description |
---|---|
static SharedDataVault |
createVault(java.lang.String dataVaultId,
char[] password)
Creates a new shared data vault with the specified identifier and password.
|
static SharedDataVault |
createVault(java.lang.String dataVaultId,
java.lang.String password,
java.lang.String salt)
Deprecated.
|
static void |
deleteVault(java.lang.String dataVaultId)
Deletes the shared vault for the specified identifier.
|
static SharedDataVault |
getVault(java.lang.String dataVaultId)
Returns the shared data vault for the specified identifier, if it exists.
|
static void |
init(android.content.Context context)
Initialization function that must be called with a context before any of the other vault methods are called.
|
static boolean |
vaultExists(java.lang.String dataVaultId)
Checks if a shared data vault exists for the specified identifier.
|
changePassword, changePassword, decrypt, decrypt, delete, deleteValue, encrypt, encrypt, getDataNames, getLockTimeout, getPasswordPolicy, getRetryLimit, getString, getValue, isDefaultPasswordUsed, isLocked, lock, modifyPassword, modifyPassword, resetLockTimeout, setLockTimeout, setPasswordPolicy, setRetryLimit, setString, setValue, unlock, unlock
public static void init(android.content.Context context)
context
- a context from which the application context is taken, must be non-nullpublic static SharedDataVault createVault(java.lang.String dataVaultId, char[] password)
The created data vault is in unlocked state.
This method requires that the library be initialized with DataVault.init(Context)
beforehand.
dataVaultId
- the identifier of the new vault, must be non-nullpassword
- password for encrypting the vault, must be non-nullDataVaultException
- if the vault cannot be created@Deprecated public static SharedDataVault createVault(java.lang.String dataVaultId, java.lang.String password, java.lang.String salt)
createVault(String, char[])
. The salt parameter is ignored.dataVaultId
- the identifier of the new vault, must be non-nullpassword
- password for encrypting the vault, can be nullsalt
- the salt, ignoredDataVaultException
- if the vault cannot be createdpublic static SharedDataVault getVault(java.lang.String dataVaultId)
DataVault.getVault(String)
apply.
This method requires that the library be initialized with DataVault.init(Context)
beforehand.
dataVaultId
- the data vault identifier, must be non-nullDataVaultException
- if any error occurs during retrievalpublic static void deleteVault(java.lang.String dataVaultId)
This method requires that the library be initialized with DataVault.init(Context)
beforehand.
dataVaultId
- the data vault identifier, must be non-nullDataVaultException
- if any error occurs during removalpublic static boolean vaultExists(java.lang.String dataVaultId)
This method requires that the library be initialized with DataVault.init(Context)
beforehand.
dataVaultId
- the data vault identifier, must be non-nullDataVaultException
- if any error occurs