4

I have an electron-angular-node project which has few tables. I am using :

  • electron version: 13.1.7
  • Angular CLI: 12.0.2
  • Node: 16.17.0
  • Package Manager: npm 9.2.0
  • OS version: Windows 10
  • better-sqlite3: 7.4.6

I need to protect the DB file in case anybody wants to change data from the db. I wants to lock it using some password and at the same time application should be able to use DB when needed.

My main question is:

Is it possible to password protect a better-sqlite3 DB file. I'm searching for some free open source solution.

Piyush Roy
  • 41
  • 3

1 Answers1

0

Yes, it is possible to password protect a better-sqlite3 DB file.

However, it is not a built-in feature of the database engine and would require additional code implementation.

One open source solution that could be used is SQLCipher, which is a free, open-source extension for SQLite that provides transparent 256-bit AES encryption of database files. SQLCipher can be integrated with better-sqlite3 to provide password protection for the DB file.

Regards!

Jsperk
  • 124
  • 1
  • 11
  • 1
    I have seen documentation of "better-sqlite3-multiple-ciphers" but found not of much use. I want to lock my DB file so that when any one tries to open it using DB browser for SQLite to see it content, they must enter a password first – Piyush Roy Jun 27 '23 at 19:14