SQLiteDatabase encrypted with SQLCypher?

I need to be able to read and write to a SQLite database from a third-party application, the database is encrypted with SQLCypher. I have the key, however when I set it via .EncryptionKey and then try to .Connect, I get DatabaseException 26 - file is not a database.

Is there some trick to working with this kind of SQLite database?

Do you have MBS SQL plugin? Looks like that support SQLCipher:

Use SQLCipher library with Xojo, a version of SQLite with built in encryption.


Thank you Alberto. This was the approach I ended up taking.

Turns out the most frustrating part of the whole thing is finding the libsqlcipher dylib/dll. You either have to compile the community version yourself from the github or pay for a commercial license.

My first attempt at compilation yielded a dylib that worked for writing but crashed for reading. After several hours of tweaking my compilation environment I re-assessed and just grabbed dylibs via homebrew. Working on compiling it for Windows as we speak.