書接上回。
(1條消息) Qt 使用Sqlite3資料庫加密_ 劉一兒(嵌入式)-CSDN部落格_qt sqlite資料庫加密
加密後,如何在指令行進行解密呢?
SQLCipher官網API:SQLCipher API - Zetetic
PS E:\QtPro\Qt5\sqlitecipher > .\sqlite3shell.exe .\student.db
SQLite version 3.8.2 2013-12-06 14:53:30
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> PRAGMA key = 'lsy';
sqlite> .tables
Student
sqlite> select * from Student;
2|2|2|2|2|test
3|3|3|33|3|test
4|4|4|4|4|test
1|1|11|1|1|test
sqlite>
PS E:\QtPro\Qt5\sqlitecipher > .\sqlite3shell.exe .\student.db
SQLite version 3.8.2 2013-12-06 14:53:30
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .tables
sqlite> PRAGMA key = 'lsy';
sqlite> .tables //仍然是沒有看到資料庫裡面的表
sqlite> select * from Student;
Error: file is encrypted or is not a database
sqlite> .e