HowSqlite3Database Encryption
1. Please follow the author's article to create a dynamic link library for sqlite3
How to Use vc6 to compile sqlite3 source code to generate a dynamic link library (Version: sqlite-source-3_6_23_1)
2. Obtain the wxsqlite3-1.9.8.zip software development kit through the Internet.
3. Decompress
Decompress wxsqlite3-1.9.8.zip software development kit
4. Copy
Copy all files under the wxsqlite3-1.9.8/sqlite3/secure/src/codec-C directory to the sqlite3 project directory
5. Add the header file:
Add the three headers codec. H, Rijndael. H, and sha2.h to the header file of the project.
Modify the codec. h header file
Open codec. h and add # include "sqliteint. H" under # include "Rijndael. H"
6. Modify the pager. c file
Open the sqlite3secure. C source file and copy the entire file;
Paste it to the end of the pager. c file and run the statement "# endif/* sqlite_omit_diskio;
Note: You can also delete the excess "# ifndef sqlite_omit_diskio and # endif/* sqlite_omit_diskio */" in the paste part;
7. added two compilation switches:
1. sqlite_has_codec;
2. threadsafe;
8. Add two lines at the end of the sqlite3.def file:
Sqlite3_key and sqlite3_rekey
That is, two functions, sqlite3_key and sqlite3 _ rekey, are exported.
9. Compile (end ).