Encrypt Offline Database property

Official Content
This documentation is valid for:

Smart Devices Offline Applications store the local database in the device's file system. By default, both Android and iOS encrypt the file system, so that the database file cannot be accessed without the users' passcode. An attacker wanting to access the local database will not be able to do so without the passcode, but the device's owner can read it easily.

This property is available in the Offline Database Object and adds an extra encryption layer so that not even the device's owner can read the local database.

Values

False (default)   The offline database won't be encrypted.
True The offline database will be encrypted

Description

When the user installs the application and launches it for the first time, the offline database is created. If the Encrypt Offline Database is set to True, then a random encryption key is generated locally on the device and stored securely. That key is used to encrypt the local database.

Technology used

To encrypt the database we are using the SQLCipher open source project (BSD-style license), both in Android and iOS.
More information at External utilities used by Genexus generated iOS applicationsExternal utilities used by GeneXus generated Android applications.

Encryption key

The encryption key is generated locally in the device, stored securely and never shown to the user.

Scope

Objects Offline Database Object
Generators iOS, Android

Availability

This property is available since GeneXus 15 Upgrade 5.

Limitations

As of the current version, the following limitations apply:

  • Encrypting an existing application's database (or decrypting if already encrypted) does not work. If you what to do that, you need to install a new version of the application.
  • Preloading the offline database is not supported if the database is encrypted.

See also

Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.