我使用这个库指南https://github.com/Willena/sqlite-jdbc-crypt来创建加密数据库。我在classpath中有该库的依赖项:
<dependency>
<groupId>io.github.willena</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.31.1</version>
</dependency>按照该链接中的指南进行操作:
我使用下面的代码创建数据库文件:
String url = "jdbc:sqlite:file:C:/Bin/db/sqllite_crypto/database?cipher=chacha20&key=myEncryptionKey";
String user = "user";
String password = "password";
final Connection connection = DriverManager.
getConnection(url, user, password);但是当我检查数据库文件时,它并没有加密!(我可以使用记事本查找插入的数据)。我做错了什么?谢谢。
发布于 2020-03-27 16:20:23
好吧,问题是,我在类路径中有另一个sqlite库(它不支持加密)。但是如果用户名\密码被定义,我们肯定会发现一些奇怪的行为:https://github.com/Willena/sqlite-jdbc-crypt/issues/14
https://stackoverflow.com/questions/60872878
复制相似问题