# Unable to get SQLCipher working with Electron on Windows

**URL:** <https://discuss.zetetic.net/t/unable-to-get-sqlcipher-working-with-electron-on-windows/3869>\
**Category:** SQLCipher\
**Created:** [August 30, 2019, 5:39am UTC](https://discuss.zetetic.net/t/unable-to-get-sqlcipher-working-with-electron-on-windows/3869 "2019-08-30T05:39:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![test](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@test](https://discuss.zetetic.net/u/test)\
**Post date:** [August 30, 2019, 5:39am UTC](https://discuss.zetetic.net/t/unable-to-get-sqlcipher-working-with-electron-on-windows/3869/1 "2019-08-30T05:39:22Z")

</div>

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](https://www.aljaiban.com/blog/setting-up-electron-with-sqlite-on-windows) 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](https://www.npmjs.com/package/@journeyapps/sqlcipher/v/3.1.15?activeTab=readme) & [link2](https://github.com/mapbox/node-sqlite3/blob/master/README.md) 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](https://www.zetetic.net/sqlcipher/design/) 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](https://github.com/mapbox/node-sqlite3/issues/872) [issues](https://github.com/mapbox/node-sqlite3/issues/856) and there seems to be no solution for it (hope I’m wrong).

I’ve [downloaded](https://sqlite.org/download.html) 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.
