DataVault

The DataVault class provides encrypted storage of occasionally used, small pieces of data. All exceptions thrown by DataVault methods are of type DataVaultException.

By linking the DataVaultLib.jar, you can use the DataVault class for on-device persistent storage of certificates, database encryption keys, passwords, and other sensitive items. Use this class to

The DataVaultLib.jar is a standalone library using which you can consume the data vault APIs directly. To consume the data vault APIs via the SAP Mobile Platform Messaging Channel, you need to link the ClientLib.jar to your project.

The contents of the data vault are strongly encrypted using AES-256. The DataVault class allows you create a named vault, and specify a password and salt used to unlock it. The password can be of arbitrary length and can include any characters. The password and salt together generate the AES key. If the user enters the same password when unlocking, the contents are decrypted. If the user enters an incorrect password, exceptions occur. If the user enters an incorrect password a configurable number of times, the vault is deleted and any data stored within it becomes unrecoverable. The vault can also relock itself after a configurable amount of time.

Typical usage of the DataVault is to implement an application login screen. Upon application start, the user is prompted for a password, which unlocks the vault. If the unlock attempt is successful, the user is allowed into the rest of the application. User credentials for synchronization can also be extracted from the vault so the user need not reenter passwords.

Private Data Vault

In addition to the DataVault class, there is a PrivateDataVault class that has the features described below:
  • Used to securely store data that is specific to an application.
  • You do not have to install the SybaseDataProvider.apk to use the private data vault.