You can set the encryption key of a local database. Set the key during application initialization, and before creating or accessing the client database.
The length of the encyption key cannot be fewer than 16 characters.
ConnectionProfile profile = <PkgName>DB.getConnectionProfile(); profile.setEncryptionKey("Your key of length 16 or more characters");
You can use the generateEncryptionKey() method to encrypt the local database with a random encryption key.
SUP101DB.generateEncryptionKey(); // store the encryption key at somewhere for reuse later ConnectionProfile profile = SUP101DB.getConnectionProfile(); String key = profile.getEncryptionKey(); ... SUP101DB.createDatabase();