C++ SQLite3 encrypted DB
I've encrypted my SQLite3 db by Navicat ! :
So my code:
QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE"); db.setDatabaseName(QApplication::applicationDirPath()+ QDir::separator() + "test.db");
and db.login() return true ;
but my trying to execute a query :
QSqlQuery q("SELECT * FROM test"); while(q.next()) qDebug()<<q.value(0).toString(); qDebug()<<q.lastError().text();
so i got :
"file is encrypted or is not a database Unable to execute statement"
i've also try to
but also didn't work
SQLite is not encrypted by default so you should check with the Navicat folks whether they are using SQLCipher for that.
AFAIR, there are instructions available to build a plugin for Qt using SQLCipher so it's worth checking.
@SGaist i've checked they use wxSQLite3 for encrypet , Qt dosen't supoort it right ? so i need to include the wxSQLite3 library in my project and use it ?
Looks like you might be lucky. QtCipherSqlitePlugin.might be what you need.
@SGaist thx :)