Encryption support?
Thanks for your work. Is it possible to provide encryption support with sqlite-net-sqlcipher?
It is possible, yes. I'd rather change the native build to use SQLCipher or another encryption provider instead of using a prebuilt solution like sqlite-net-sqlcipher, though.
Hi @gilzoide, Thanks a lot for your great work on this plugin — it's been really helpful in my Unity project! 🙏 I saw this issue and was wondering if you're currently working on adding support for encryption? If not, is there any guidance to integrate it manually?
Thanks again!
Hey @titouandelpech, glad you liked the plugin =D
I saw this issue and was wondering if you're currently working on adding support for encryption?
This is planned, likely the next thing for this package, but no, I'm not actively working on it right now.
If not, is there any guidance to integrate it manually?
We'll, you'd need to change the sqlite3.c amalgamated code from SQLite to an amalgamation of SQLCipher or SQLite3MultipleCiphers or some other SQLite fork with support for encryption, build again for each platform and that should be it. SQLCipher depends on third party cryptographic providers (OpenSSL, LibTomCrypt, CommonCrypto/Security.framework, or NSS), so you'll need to build one of them as well. SQLite3MultipleCiphers does not need any, as they implement their own cryptography primitives (which is not recomended unless you know very well what you're doing, but since it has been tested in lots of projects out there, likely utelle knows what they're doing).
From my point of view, SQLite3MultipleCiphers is likely the easiest to integrate, since it does not have external dependencies. If it can be amalgamated to a single file just like SQLite can, then generating an amalgamation, replacing sqlite3.c and rebuilding should do it.
Thanks a lot! That makes things much clearer. It's not a priority for me, but I might try integrating SQLite3MultipleCiphers later if it's not available by then. Appreciate the guidance!