Giter Club home page Giter Club logo

Comments (6)

utelle avatar utelle commented on June 18, 2024

The encryption extension coming with wxSQLite3 can be configured to use 256 bit AES encryption instead of the default 128 bit AES encryption.

Besides that you are free to combine the SQLCipher SQLite library with wxSQLite3. wxSQLite3 should work with SQLCipher out of the box, since SQLCipher uses the official encryption interface (sqlite3_key and sqlite3_rekey). This requires just to link wxSQLite3 against the SQLCipher library - any reasonably experienced developer should be able to do this.

IMHO no modifications to the wxSQLite3 source code are required to use the SQLCipher based SQLite library. So what would you expect from a SQLCipher support for wxSQLite3? How would it look like?

from wxsqlite3.

utelle avatar utelle commented on June 18, 2024

Since it was not clarified what would be expected from SQLCipher support for wxSQLite3, I close this issue. Feel free to reopen it, if additional information is provided.

from wxsqlite3.

guanlisheng avatar guanlisheng commented on June 18, 2024

with the following pragma, wxsqlite3 can open sqlcipher's file

PRAGMA cipher=SQLCipher;
pragma legacy=4;

from wxsqlite3.

utelle avatar utelle commented on June 18, 2024

with the following pragma, wxsqlite3 can open sqlcipher's file

PRAGMA cipher=SQLCipher;
pragma legacy=4;

wxSQLite3 has support for SQLCipher for almost 5 years now, using the class wxSQLite3CipherSQLCipher as a parameter to the wxSQLite3Database::Open method (if you are using it in a wxWidgets based application) - see the minimal sample coming with wxSQLite3 for an example.

Of course, it is possible to configure the cipher scheme without using the class wxSQLite3CipherSQLCipher by using PRAGMA SQL statements or even by using URI parameters with the database file name - that is, with all methods described in the SQLite3 Multiple Ciphers documentation. But IMHO in a wxSQLite3 based application using a dedicated wxSQLite3Cipher classes is usually more convenient.

from wxsqlite3.

guanlisheng avatar guanlisheng commented on June 18, 2024

agreed.
Currently, the case is to migrate from aes128cbs to SQLCipher gradually for both the program and its data.

from wxsqlite3.

utelle avatar utelle commented on June 18, 2024

Currently, the case is to migrate from aes128cbs to SQLCipher gradually for both the program and its data.

Method

wxSQLite3Database::ReKey(const wxSQLite3Cipher &cipher, const wxString &newKey)

can be used to not only change the passphrase, but also the cipher scheme - just pass an appropriately initialized wxSQLite3Cipher object as the first parameter.

The only constraint is that enough disk space is available to actually do the conversion - free disk space of about 2 times the current size of the database should usually be enough.

And of course the application needs exclusive access to the database file.

from wxsqlite3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.