* make sure pager is valid We have had a segfault issue recently because the pager passed down to the c code was null. That happened because libsql-server had encryption disabled, while libsql had encryption enabled. To prevent issues like that in the future, the C code should be checking if the arguments it needs are valid. Because this function returned a pointer, we now change it so that it can return an integer, with the pointer as a return argument. * update generated code We have generated code in-tree. We should either remove it, or keep it in sync. For now, just keeping it in sync. This patch is just the result of running tests, and seeing what changes.
SQLite3MultipleCiphers
The project SQLite3 Multiple Ciphers implements an encryption extension for SQLite with support for multiple ciphers. In the past the encryption extension was bundled with the project wxSQLite3, which provides a thin SQLite3 database wrapper for wxWidgets.
In the course of time several developers had asked for a stand-alone version of the wxSQLite3 encryption extension. Originally it was planned to undertake the separation process already in 2019, but due to personal matters it had to be postponed for several months. However, maybe that wasn't that bad after all, because there were changes to the public SQLite code on Feb 7, 2020: “Simplify the code by removing the unsupported and undocumented SQLITE_HAS_CODEC compile-time option”. These changes took effect with the release of SQLite version 3.32.0 on May 22, 2020. As a consequence, all SQLite encryption extensions out there will not be able to easily support SQLite version 3.32.0 and later.
In late February 2020 work started on a new implementation of a SQLite encryption extension that will be able to support SQLite 3.32.0 and later. The new approach is based on SQLite's VFS feature. This approach has its pros and cons. On the one hand, the code is less closely coupled with SQLite itself; on the other hand, access to SQLite's internal data structures is more complex.
The code was mainly developed under Windows, but was tested under Linux as well. At the moment no major issues are known.
Version information
- 1.8.1 - December 2023
- Based on SQLite version 3.44.2
- Fixed issue #133 - missing API symbols
- Applied several modifications to improve support for SQLite3 WASM
For further version information please consult the CHANGELOG.
How to participate
Help in testing and discussing further development will be highly appreciated. Please use the issue tracker to give feedback, report problems, or to discuss ideas.
Documentation
Documentation of the currently supported cipher schemes and the C and SQL interfaces is provided on the SQLite3 Multiple Ciphers website.
Documentation on how to build the extension can be found on the page SQLite3 Multiple Ciphers Installation.