SQLite Browser with SQLCipher

787 views
Skip to first unread message

inx

unread,
Jul 9, 2010, 1:06:06 AM7/9/10
to sqlc...@googlegroups.com
Hi all,

Just would like to say thanks Stephen for SQLCipher library and domehead100 for the info on how to build SQLCipher with Visual Studio.

After having success building SQLCipher with Visual Studio, I was hoping my (favorite) SQLiteBrowser was able to view the ciphered database. So after spending time messing around with the source code, I'm able to open ciphered database with SQLiteBrowser. The modified SQLiteBrowser will prompt for pragma key when opening a ciphered database file. So I'm sharing this for anyone who is interested.

Here are the summarized steps I took:

0. Requires:
- Openssl (I'm using windows binary distributions)
- Qt SDK
- SQLiteBrowser source code
- SQLCipher source code
- Visual Studio

1. Convert SQLite Browser Qt project file (.pro) to Visual Studio project file using Qt qmake with command line:

"qmake -t vcapp -o sqlitebrowser.vcproj sqlitebrowser.pro"

2. Set the Openssl and Qt path (according to where you install) to make sure it compiles.

3. Add the preprocessor definition SQLITE_HAS_CODEC.
(Also added SQLITE_OMIT_LOAD_EXTENSION and SQLITE_CORE to get rid of the rtree and fts3 errors)

4. Exclude all the files under /sqlite_source from project

5. Include SQLCipher source code to project, except shell.c and tclsqlite.c

6. Modify sqlitedb.cpp to prompt for pragma key (attached source code for reference)

7. Compile & Link

That's all. Hope you may find it useful. =)

p/s: Sorry for my English.

sqlitebrowser_modded.png
sqlitedb.cpp

Stuk

unread,
Jul 26, 2010, 11:44:22 AM7/26/10
to SQLCipher Users
Great Job!
I compile in qt and works!
I have delete all test* file of sqlcipher
>  sqlitebrowser_modded.png
> 29KVisualizzaScarica
>
>  sqlitedb.cpp
> 20KVisualizzaScarica
Reply all
Reply to author
Forward
0 new messages