Search code examples
realmrealm-mobile-platform

Possible to encrypt synced realm database


Is it possible to encrypt the server database used for Realm?

I tried to create a new database with following configuration:

SyncConfig conf = new SyncConfiguration.Bulider(user, serverURL).encryptionKey(theKey).build();
Realm realm = Realm.getInstance(conf);

Then I add some data to the realm database, but if I use Realm Browser to look at the database, the data is in clear text, not encrypted.

Realm for Java version 3.4.0 Realm Mobile Platform 1.7.4 (running on macOS for testing)

Thanks!


Solution

  • The data on the device is encrypted, so you wouldn't be able to view it. On the server, it is stored in plaintext, as only trusted people should have access to it.

    If you're interested in end-to-end encryption, you can check out the ZeroKit SDK which can be integrated into Realm.