Couchbase Lite Encryption

I’m creating a react native android application with the couchbase lite and need to encrypt the local database.

However, it looks like the CBL 1.4 REST API to create the database still does not support the encryption key.

Is there another way to do this?

Thanks.

I think you’d need to modify the native code in the Cordova plugin to do this, since the REST API doesn’t support it. I don’t believe we have any docs about this, though, sorry.

You were right @jens.

I tried other solutions but the only way it worked was by modifying the plugin. I’m using the react-native-couchbase-lite plugin.

Thanks!

Is this something you can submit a PR for (https://github.com/couchbaselabs/react-native-couchbase-lite) ? (CC @jamiltz)

The plugin can easily be extended if you follow the guidelines on the react native docs:

You can find examples of other methods that were added that way (installPrebuiltDatabase on iOS and Android). Let us know if you have any questions extending what you need!