I’m trying to encrypt a local Sqlite3 DB with an Electron App on Windows 10. I understand that Sqlite has to be specifically built to target the Electron Framework using npm. Used this link to setup sqlite for electron.
Now my requirement is to encrypt it. After some research, I ran into SqlCipher which is an extension of sqlite. I’m guessing my original sqlite installation doesn’t have the SqlCipher libraries, so I referred to these links, link1 & link2 to install sqlcipher on windows using both variations of the following commands:
variation 1:
npm install sqlite3 --build-from-source --runtime=electron --target=5.0.6 --dist-url=https://atom.io/download/electron
variation 2:
npm install sqlite3 --build-from-source --runtime=electron --target=5.0.6 --sqlite_libname=sqlcipher --dist-url=https://atom.io/download/electron
I’m not able to encrypt the DB even after using both variants mentioned above to install sqlcipher on a windows machine. These are the instructions I followed to encrypt the DB, but I’m able to see the contents of the DB in plaintext using hexdump and DB Browser for sqlite.
After some more searching for ways to get sqlcipher to work for electron on windows, I found more evidence that other people have had similar issues and there seems to be no solution for it (hope I’m wrong).
I’ve downloaded a sqlite CLI to interact with the test DBs I’m creating to test DB encryption.
My guess is, the version of sqlite I’m installing doesn’t have SqlCipher installed, which is why the DB is not being encrypted. How can I get SqlCipher to work on Windows? Any links, guides or help would be appreciated. Thanks for your time.