From 06b3f0370f9de519c5cc9e3cd9849eb098003a6d Mon Sep 17 00:00:00 2001 From: DenioD <41270280+DenioD@users.noreply.github.com> Date: Sun, 24 May 2020 09:55:01 +0200 Subject: [PATCH] use userpw for encryption at sdl close --- src/mainwindow.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 5bb0740..49f4f72 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -477,6 +477,9 @@ void MainWindow::removeWalletEncryption() { FileEncryption::decrypt(target_decwallet_file, target_encwallet_file, key); FileEncryption::decrypt(target_decaddr_file, target_encaddr_file, key); + QFile filencrypted(dirHome.filePath(".silentdragonlite/silentdragonlite-wallet-enc.dat")); + filencrypted.remove(); + } } @@ -486,6 +489,8 @@ void MainWindow::removeWalletEncryptionStartUp() { ed.setupUi(&d); // Handle edits on the password box + QString password = ed.txtPassword->text(); + auto fnPasswordEdited = [=](const QString&) { // Enable the OK button if the passwords match. if (!ed.txtPassword->text().isEmpty() && @@ -506,7 +511,7 @@ void MainWindow::removeWalletEncryptionStartUp() { { QString str = ed.txtPassword->text(); // data comes from user inputs int length = str.length(); - + this->setPassword(str); char *sequence = NULL; sequence = new char[length+1]; strncpy(sequence, str.toLocal8Bit(), length +1);