如何在Java中对sqlite3数据库进行加密和解密?

huangapple go评论66阅读模式
英文:

How to encrypt and decrypt a sqlite3 database in Java?

问题

首先,我需要对我的sqlite3数据库进行加密,因为其中包含非常敏感的数据。
然后,我只需要在需要时解密我的数据库。我该如何做呢?
我正在使用sqlite3-jdbc-3.30.1和DB Browser for Sqlite。
我的数据库包含许多字符串数据。我的数据格式如下:

ID,lemma,definition

1,Hello,一个问候表达式

Connection conn = null;
try {
    conn = DriverManager.getConnection("jdbc:sqlite:C:\\sqlite databases\\library.db");
}
catch(SQLException exc) {}
英文:

First of all I need to encrypt my sqlite3 database, because there are very sensitive data.
Then I would only need to decrypt my database when I need it. How could I do?
I am using the sqlite3-jdbc-3.30.1 and DB Browser for Sqlite.
My databases contains lots of strings. My data is like:

ID , lemma , definition

1 , Hello , an expression of greeting

Connection conn = null;
	try {
     	conn = DriverManager.getConnection("jdbc:sqlite:C:\\sqlite databases\\library.db"); 
     
	}
	catch(SQLException exc) {}

答案1

得分: 1

我建议您使用SqlCipher,这是链接:

https://www.zetetic.net/sqlcipher/

英文:

I would recommend that you use SqlCipher this is the Link:

https://www.zetetic.net/sqlcipher/

答案2

得分: 1

请尝试这个网址:

http://sqlite-crypt.com/

它可以对数据库数据进行加密。

英文:

try this one

http://sqlite-crypt.com/

it will encrypt database data

huangapple
  • 本文由 发表于 2020年8月30日 22:24:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/63658432.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定