mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 19:11:39 -06:00
sqlcipher: Fix editing the encryption for SQLCipher4
With SQLCipher4 the encryption was not working as expected because the KDF and HMAC algorithms were not set properly. This is fixed in this commit so it should work now with SQLCipher4 as well as SQLCipher3. See issues #1690 and #1732.
This commit is contained in:
@@ -3177,12 +3177,12 @@ void MainWindow::editEncryption()
|
||||
qApp->processEvents();
|
||||
if(ok)
|
||||
ok = db.executeSQL(QString("PRAGMA sqlitebrowser_edit_encryption.cipher_page_size = %1").arg(cipherSettings.getPageSize()), false, false);
|
||||
if(ok)
|
||||
ok = db.executeSQL(QString("PRAGMA sqlitebrowser_edit_encryption.kdf_iter = %1").arg(cipherSettings.getKdfIterations()), false, false);
|
||||
if(ok)
|
||||
ok = db.executeSQL(QString("PRAGMA sqlitebrowser_edit_encryption.cipher_hmac_algorithm = %1").arg(cipherSettings.getHmacAlgorithm()), false, false);
|
||||
if(ok)
|
||||
ok = db.executeSQL(QString("PRAGMA sqlitebrowser_edit_encryption.cipher_kdf_algorithm = %1").arg(cipherSettings.getKdfAlgorithm()), false, false);
|
||||
if(ok)
|
||||
ok = db.executeSQL(QString("PRAGMA sqlitebrowser_edit_encryption.kdf_iter = %1").arg(cipherSettings.getKdfIterations()), false, false);
|
||||
|
||||
// Export the current database to the new one
|
||||
qApp->processEvents();
|
||||
|
||||
Reference in New Issue
Block a user