mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
Add initial SQLCipher support
Add some basic initial support for SQLCipher. Note that this is more of a POC than a final implementation. This commit adds an option called 'sqlcipher' to the cmake and qmake projects which - when enabled - replaces the default SQLite3 include and library files by their SQLCipher counter-parts. Especially on MacOS X there might be some more work required in finding the correct include paths. The SQLCipher library supports unencrypted databases, too, so even if the option is enabled the program behaves like before. You can see the difference, though, in the About Dialog where the SQLite version string will say 'SQLCipher version xy'. When the sqlcipher option is enabled and you try to open a file which is neither a project file nor a normal SQLite3 database it is assumed now that the file is an encypted database. There is no way to tell between an invalid file and an encypted file, so in both cases a password dialog pops up. When the correct password and page size are entered the file is opened and can be edited like any other database before. Creating encrypted databases isn't supported yet. So for testing you need to fall back to the sqlcipher command line tool. See issue #12.
This commit is contained in:
12
src/sqlite.h
Normal file
12
src/sqlite.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef SQLITE_H
|
||||
#define SQLITE_H
|
||||
|
||||
#ifdef SQLCIPHER
|
||||
#define SQLITE_TEMP_STORE 2
|
||||
#define SQLITE_HAS_CODEC
|
||||
#include <sqlcipher/sqlite3.h>
|
||||
#else
|
||||
#include <sqlite3.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user