@@ -128,8 +128,8 @@ bool DBBrowserDB::open(const QString& db, bool readOnly)
128128 executeSQL (QString (" PRAGMA key = %1" ).arg (cipherSettings->getPassword ()), false , false );
129129 executeSQL (QString (" PRAGMA cipher_page_size = %1;" ).arg (cipherSettings->getPageSize ()), false , false );
130130 executeSQL (QString (" PRAGMA kdf_iter = %1;" ).arg (cipherSettings->getKdfIterations ()), false , false );
131- executeSQL (QString (" PRAGMA cipher_hmac_algorithm = HMAC_ %1;" ).arg (cipherSettings->getHmacAlgorithm ()), false , false );
132- executeSQL (QString (" PRAGMA cipher_kdf_algorithm = PBKDF2_HMAC_ %1;" ).arg (cipherSettings->getKdfAlgorithm ()), false , false );
131+ executeSQL (QString (" PRAGMA cipher_hmac_algorithm = %1;" ).arg (cipherSettings->getHmacAlgorithm ()), false , false );
132+ executeSQL (QString (" PRAGMA cipher_kdf_algorithm = %1;" ).arg (cipherSettings->getKdfAlgorithm ()), false , false );
133133 }
134134#endif
135135 delete cipherSettings;
@@ -245,12 +245,12 @@ bool DBBrowserDB::attach(const QString& filePath, QString attach_as)
245245 QMessageBox::warning (nullptr , qApp->applicationName (), lastErrorMessage);
246246 return false ;
247247 }
248- if (!executeSQL (QString (" PRAGMA %1.cipher_hmac_algorithm = HMAC_ %2" ).arg (sqlb::escapeIdentifier (attach_as)).arg (cipherSettings->getHmacAlgorithm ()), false ))
248+ if (!executeSQL (QString (" PRAGMA %1.cipher_hmac_algorithm = %2" ).arg (sqlb::escapeIdentifier (attach_as)).arg (cipherSettings->getHmacAlgorithm ()), false ))
249249 {
250250 QMessageBox::warning (nullptr , qApp->applicationName (), lastErrorMessage);
251251 return false ;
252252 }
253- if (!executeSQL (QString (" PRAGMA %1.cipher_kdf_algorithm = PBKDF2_HMAC_ %2" ).arg (sqlb::escapeIdentifier (attach_as)).arg (cipherSettings->getKdfAlgorithm ()), false ))
253+ if (!executeSQL (QString (" PRAGMA %1.cipher_kdf_algorithm = %2" ).arg (sqlb::escapeIdentifier (attach_as)).arg (cipherSettings->getKdfAlgorithm ()), false ))
254254 {
255255 QMessageBox::warning (nullptr , qApp->applicationName (), lastErrorMessage);
256256 return false ;
@@ -404,9 +404,9 @@ bool DBBrowserDB::tryEncryptionSettings(const QString& filePath, bool* encrypted
404404 if (cipherSettings->getKdfIterations () != enc_default_kdf_iter)
405405 sqlite3_exec (dbHandle, QString (" PRAGMA kdf_iter = %1;" ).arg (cipherSettings->getKdfIterations ()).toUtf8 (), nullptr , nullptr , nullptr );
406406 if (cipherSettings->getHmacAlgorithm () != enc_default_hmac_algorithm)
407- sqlite3_exec (dbHandle, QString (" PRAGMA cipher_hmac_algorithm = HMAC_ %1;" ).arg (cipherSettings->getHmacAlgorithm ()).toUtf8 (), nullptr , nullptr , nullptr );
407+ sqlite3_exec (dbHandle, QString (" PRAGMA cipher_hmac_algorithm = %1;" ).arg (cipherSettings->getHmacAlgorithm ()).toUtf8 (), nullptr , nullptr , nullptr );
408408 if (cipherSettings->getKdfAlgorithm () != enc_default_kdf_algorithm)
409- sqlite3_exec (dbHandle, QString (" PRAGMA cipher_kdf_algorithm = PBKDF2_HMAC_ %1;" ).arg (cipherSettings->getKdfAlgorithm ()).toUtf8 (), nullptr , nullptr , nullptr );
409+ sqlite3_exec (dbHandle, QString (" PRAGMA cipher_kdf_algorithm = %1;" ).arg (cipherSettings->getKdfAlgorithm ()).toUtf8 (), nullptr , nullptr , nullptr );
410410
411411 *encrypted = true ;
412412#else
0 commit comments