Crypto SQLite
Create a new encrypted database:
C:\tmp\>sqlcrypt.exe encrypted.db SQLcrypt version 3.0.7 Enter ".help" for instructions sqlcrypt> .encrypt "this is a passphrase with spaces" sqlcrypt> create table a (ak int, av int); sqlcrypt> insert into a values (1,1); sqlcrypt> insert into a values (2,2); sqlcrypt> select * from a; 1|1 2|2 sqlcrypt> delete from a where ak = 1; sqlcrypt> select * from a; 2|2 sqlcrypt>
Open an existing encrypted database:
C:\tmp\>sqlcrypt.exe encrypted.db SQLcrypt version 3.0.7 Enter ".help" for instructions sqlcrypt> .decrypt "this is a passphrase with spaces" sqlcrypt> select * from a; 2|2 sqlcrypt>
Attach an encrypted database:
C:\tmp\>sqlcrypt.exe encrypted2.db SQLcrypt version 3.0.7 Enter ".help" for instructions sqlcrypt> .encrypt "another encrypted database" sqlcrypt> create table b (bk int, bv int); sqlcrypt> insert into b values (9,9); sqlcrypt> insert into b values (8,8); sqlcrypt> attach_passphrase "this is a passphrase with spaces" "encrypted.db" as a; sqlcrypt> select * from a.a; 2|2 sqlcrypt>
Open the encrypted database with stock SQLite executable:
C:\tmp\>sqlite3.exe encrypted.db SQLite version 3.0.7 Enter ".help" for instructions sqlite> select * from a; SQL error: file is encrypted or is not a database sqlite>
Very simple API:
int sqlcrypt3_passphrase(sqlite3 *, unsigned char *, int, unsigned char **);
This is a commercial product. There are a couple of issues to think through, then I'll start a beta programme, probably next week. Write me if you're interested. Beta testers who provide feedback get a complimentary license.