使用SQLiteCrypt加密sqlite数据库

时间:2013-05-27 13:29:05

标签: sqlite

我正在努力寻找用密码来保护sqlite数据库的解决方案。我正在尝试使用SQLiteCrypt。我跟着a link的指示! ,但是当我输入时;

sqlite3_open_v2("data.db", &db, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);

我得到:错误:靠近“sqlite3_open_v2”:语法错误。 有人可以帮忙吗?

1 个答案:

答案 0 :(得分:-1)

D:\>sqlite.exe data.db
SQLite version 3.7.15.2 2013-01-09 11:53:05
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> PRAGMA lic = '77523-009-0000007-72328';
sqlite> PRAGMA rekey = 'ac23';
sqlite> .exit

你必须先退出才能看到效果!

D:\>sqlite.exe data.db
SQLite version 3.7.15.2 2013-01-09 11:53:05
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select * from _MapPropertyA;
Error: file is encrypted or is not a database

DONE,您的数据库文件已加密