Encryption of sqlite db in java

10,014

Solution 1

try this http://sqlite-crypt.com/index.htm

Solution 2

There is an encryption library (sqlite-crypt) available in C, but if you want to do it in Java, You could simply encrypt the database file like any other file. See this example of file encryption/decryption in Java.

You might also like to take a look at SafeJDBC.

Share:
10,014
DG.
Author by

DG.

Updated on August 21, 2022

Comments

  • DG.
    DG. over 1 year

    I am using SQLite JDBC driver from xerial project. What do we mean when we say encrypting the sqlite db ? I would like to know the best way to encrypt either the data in the db or the whole sqlite DB. For that, do I need to encrypt each field value and then write it in to DB or should I simply encrypt the .db file using Java ? What are the pros and cons and method generally used ? Any help is appreciated.

    Thanks, Deep