From the documentation it seems like this is impossible, but I want to be sure. Here is my use case:
I want an encrypted database. It must be decrypted while it is in memory (while the program is running). The only way I can do this is to decrypt the file from disk before transferring it to SQLite. But I can’t find a way to give a SQLite pointer and say, "Here it is a database." I also cannot find a way to serialize the database in memory, and then encrypt it before writing to disk. I suggest that sqlite3_backup API will need an unencrypted database file?
I work on Android, so I would like to use the built-in SQLite, and I don’t think it would be possible to install SQLite Encryption Extension (SEE) . (Running on Android also means that I don't have full access to the C ++ API, but this time we can ignore it).
source share