1

I would like to know if it is possible without adding new libraries, to open an encrypted sql database inside a software using QT libraries. In the program SQLITEManager, it is possible to use 4 kinds of encryption:

  • AES128
  • AES256
  • RC4
  • SQLCipher

My database is accessed with the following code:

    QSqlDatabase myDB = QSqlDatabase::addDatabase("QSQLITE", "UserConnection");
    myDB.setDatabaseName("Files/Users.db");
    if (!myDB.open())
    {
        qDebug()<<"Failed to open SQL database of registered users";
    }
    else
    {
        qDebug()<<"Successfully opening SQL database of registered users";
        QSqlQuery query(myDB);
        //actions read or write
    }

Is there a way to read the database if I add an encryption from SQLITEManager?

froz
  • 163
  • 1
  • 12
  • 1
    There's [no standard way](https://stackoverflow.com/a/5877130/14637) to encrypt an SQLite database, so you'll likely have to do the legwork yourself. – Thomas Feb 04 '20 at 09:57
  • So maybe it is better to store it in a binary file – froz Feb 04 '20 at 10:28

0 Answers0