Welcome to sqlite3fish project

1. What is sqlite3fish?


The sqlite3fish is another encryption solution for sqlite3.
It is based on some source code of botansqlite3(https://github.com/OlivierJG/botansqlite3) .
But it does not need Botan library, it uses Blowfish algorithm to encrypt/decrypt the database file.
This library only depends on the source code(no-modify) of SQLite3, it is clean and easy to compile.
But currently it only supports the version 3.7.0 of SQLite3 (http://www.sqlite.org/sqlite-amalgamation-3_7_0.zip) .


Find project details

please see http://sourceforge.net/projects/sqlite3fish


Download source files

please see http://sourceforge.net/projects/sqlite3fish/files






2. How to compile it?

First you need to download the zip file of the library, and then unzip it.
Here are the descriptions of some important directories and files:
sqlite3fish/lib/                                 ---       The binary file of sqlite3fish static library is placed there.
sqlite3fish/sqlite3/                          ---       The source code of SQLite3 (version 3.7.0, no-modify).
sqlite3fish/src/                                ---       The source code of sqlite3fish.
sqlite3fish/sqlite3fish.cbp              ---       The Code::Blocks project file of sqlite3fish DLL.
sqlite3fish/sqlite3fish_static.cbp   ---       The Code::Blocks project file of sqlite3fish static library.
sqlite3fish/sqlite3fish_shell.cbp    ---       The Code::Blocks project file of sqlite3fish shell tool.

So, obviously you may compile them easily with Code::Blocks in Windows, Linux and Mac.
Further, because this library has included the source code of SQLite3 and need no any other third-party library, it is also a very easy job to build it for Android, iOS and Windows Phone.




3. How to setup a password for the database?

Sample:

~ $ sqlite3fish_shell test.db
sqlite> PRAGMA key='test123';
sqlite> CREATE TABLE t1(a,b);
sqlite> INSERT INTO t1(a,b) VALUES ('one', 'two');
sqlite> .quit

~ $ sqlite3fish_shell test.db
sqlite> SELECT * FROM t1;
Error: file is encrypted or is not a database

~ $ sqlite3fish_shell test.db
sqlite> PRAGMA key='test123';
sqlite> SELECT * FROM t1;

~ $ sqlite3fish_shell test.db
sqlite> PRAGMA key='test123';
sqlite> PRAGMA rekey='test789';
sqlite> .quit

~ $ sqlite3fish_shell test.db
sqlite> PRAGMA key='test789';
sqlite> SELECT * FROM t1;





4. Why use sqlite3fish?

a. The Blowfish algorithm is light and fast.
    So if you just want to make your database unreadable to the users, sqlite3fish will be a good choice.


b. The sqlite3fish library is clean and easy to build for any platform which supports SQLite3.

c. It is free and open-source.




5. License?

Free and open-source, BSD License.

(As SQLite3 is in public domain and Botan uses BSD License,
I believe that sqlite3fish could use BSD License at least.)







กก