How do i view the encrypted database (sqlcipher)

Hi, new to Couchbase lite. I am using the IOS version (1.2) . I notice that if i do not encrypt the database and store some data, i am able to open the database db.sqlite3 which is stored under the files for the simulator. However if i encrypt the database using a key , then i am unable to open the db.sqlite3 database using sqlcipher even if i use PRAGMA key = ‘some key’, which i the same key that i passed to [manager registerEncryptionKey :@‘some key’ :@‘databaseName’]. I have also tried using Couchbase Lite Viewer to open the encrypted file, but no success.

I guess one way to check the data is to replicate the data to another database which is not encrypted. Are there other options?

Thanks in advance.

I don’t think we use exactly the same algorithm as SQLCipher to convert a password into a binary AES256 key; that’s probably why the pragma doesn’t work.

It would be a good idea to add encryption support to the viewer app. Could you file an issue, please?

Replication is probably the most convenient option right now. For example you could download CouchDB and run a local instance, then push to it. CouchDB has a web UI that you can use to view documents.

Another approach is to run the listener in your app when in development mode; then you can use curl or some other HTTP client to send requests to the app and view and modify the database.

Thanks for your reply. Have raised an issue as suggested.