Skip to content

manfredipist/qsqlcipher-qt6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Qt SQL driver plugin for SQLCipher ( for Qt 6 )

This branch builds against the Qt version 6.4.1. To build for previous versions choose from the releases the one that matches the system's Qt version.

See https://github.com/sijk/qt5-sqlcipher to build up to Qt 5.5.x

See https://github.com/sjemens/qsqlcipher-qt5 to build up to Qt 5.15.x

The sources for this plugin are based on the sqlite plugin from qt/qtbase

Dependencies

This plugin is using the SQLCipher for the encryption of database files. SQLCipher is included in the 3rdparty folder, but there is also the option to use the system's library. The required libraries are found by pkg-config. If pkg-config is not available you should edit the qsqlcipher.pro and set the INCLUDEPATH and LIBS variables.

By default, the cryptography backend is provided by libtomcrypt, also included in the 3rdparty folder. There will also be an option to choose some other backend.

Build instructions (without the tests)

git clone https://github.com/sjemens/qsqlcipher-qt6.git
cd qsqlcipher-qt6
mkdir -p build && cd build
qmake ../qsqlcipher.pro
make
make install  # most propably with sudo

Build with system's sqlcipher

git clone https://github.com/sjemens/qsqlcipher-qt6.git
cd qsqlcipher-qt6
mkdir -p build && cd build
qmake ../qsqlcipher.pro CONFIG+=system-sqlcipher
# Or if the sqlcipher library was not built with the ENABLE_COLUMN_METADATA macro
# defined, disable it also for qsqlcipher. Replace the above qmake command with
# qmake ../qsqlcipher.pro  CONFIG+=system-sqlcipher DEFINES+=DISABLE_COLUMN_METADATA 
make
make install  # most propably with sudo

Note: To check if the sqlcipher library was compiled with ENABLE_COLUMN_METADATA use PRAGMA compile_options;

Building and running the tests

git clone https://github.com/sjemens/qsqlcipher-qt6.git
cd qsqlcipher-qt6
mkdir -p build && cd build
qmake CONFIG+="withTests" ../qsqlcipher.pro
make
# in linux
./tests/qsqlcipher_test
# in windows (MSYS2-mingw) both the debug and release
# versions should have been built by default
# so we will check both of them
./tests/debug/qsqlcihper_test
./tests/release/qsqlcihper_test
# Unless you also want to install the tests change to 
# the lib folder
cd qsqlcipher
sudo make install

Tip: A quick way to find if the tested plugin is the newly built and not the one in 'QT_INSTALL_PLUGINS' is to define the QT_DEBUG_PLUGINS and check the loaded library path.

QT_DEBUG_PLUGINS=1 ./tests/qsqlcipher_test

Credits

  1. sijk

  2. sjemens

Licenses

For this plugin see LICENSE (LGPLV3)

libtomcrypt (Public domain)

SQLCipher (BSD)

Qt6 libraries (LGPLV3 GPLV2/GPLV3)

About

Qt6 SQL driver plugin for SQLCipher

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published