devbean / QtCipherSqlitePlugin

A Qt plugin for cipher SQLite.
http://qtciphersqliteplugin.galaxyworld.org
GNU Lesser General Public License v2.1
392 stars 159 forks source link

Can't open from Navicat #11

Closed MrLibya closed 7 years ago

MrLibya commented 7 years ago

I've compiled the plugin and evrything is ok 👍 so i've create new Sqlite3 DB from navicat and uses encrypt option : img , Navicat uses wxSQLite3 for encrypt, but when i try to login from Qt to the database it says : Can not open connection: "Invalid password"

so i've change the db name to another name(non-exist db):QString DB_FILE_PATH = dir + "/test_new.db"; and dbconn.setPassword("gogo");

he did make a new DB called test_new , and evrything work find : img

but when i try to connect to this db from navicat and i've put the encrypt password (gogo) it says : img , that's haapens when the password is incorrect !

so what is the problem ? i've also try to use only numbers but same problem !

devbean commented 7 years ago

Please check which encrypt algorithm Navicat use. I googled Navicat uses wxSQLite3 (128-bit AES) for SQLite encryption while QtCipherSqlitePlugin uses AES-256 by default. In order to use AES-128, change CODEC_TYPE to CODEC_TYPE_AES128 in DEFINES in sqlitecipher/sqlite3/sqlite3.pri. Please let me know if this works.

MrLibya commented 7 years ago

Yes it's work , thx :)