|
|
@ -441,9 +441,6 @@ void MainWindow::closeEventpw(QCloseEvent* event) { |
|
|
|
} else { |
|
|
|
qDebug() << __func__ << ": invalid rpc object!"; |
|
|
|
} |
|
|
|
|
|
|
|
// Close the app
|
|
|
|
this->close(); |
|
|
|
} |
|
|
|
|
|
|
|
void MainWindow::encryptWallet() { |
|
|
@ -474,7 +471,8 @@ void MainWindow::encryptWallet() { |
|
|
|
QObject::connect(ed.txtConfirmPassword, &QLineEdit::textChanged, fnPasswordEdited); |
|
|
|
QObject::connect(ed.txtPassword, &QLineEdit::textChanged, fnPasswordEdited); |
|
|
|
|
|
|
|
if (d.exec() == QDialog::Accepted) { |
|
|
|
if (d.exec() == QDialog::Accepted) |
|
|
|
{ |
|
|
|
|
|
|
|
QString passphraseBlank = ed.txtPassword->text(); // data comes from user inputs
|
|
|
|
QString passphrase = QString("HUSH3") + passphraseBlank + QString("SDL"); |
|
|
@ -492,12 +490,12 @@ void MainWindow::encryptWallet() { |
|
|
|
sequence1 = new char[length+1]; |
|
|
|
strncpy(sequence1, passphraseHash.toUtf8(), length+1); |
|
|
|
|
|
|
|
#define MESSAGE ((const unsigned char *) sequence) |
|
|
|
#define MESSAGE_LEN length |
|
|
|
#define hash ((const unsigned char *) sequence1) |
|
|
|
#define MESSAGE ((const unsigned char *) sequence) |
|
|
|
#define MESSAGE_LEN length |
|
|
|
#define hash ((const unsigned char *) sequence1) |
|
|
|
|
|
|
|
#define PASSWORD sequence |
|
|
|
#define KEY_LEN crypto_box_SEEDBYTES |
|
|
|
#define PASSWORD sequence |
|
|
|
#define KEY_LEN crypto_box_SEEDBYTES |
|
|
|
|
|
|
|
unsigned char key[KEY_LEN]; |
|
|
|
|
|
|
@ -650,7 +648,8 @@ void MainWindow::removeWalletEncryptionStartUp() { |
|
|
|
cl->loadConnection(); |
|
|
|
}); |
|
|
|
|
|
|
|
if (d.exec() == QDialog::Accepted) { |
|
|
|
if (d.exec() == QDialog::Accepted) |
|
|
|
{ |
|
|
|
QString passphraseBlank = ed.txtPassword->text(); // data comes from user inputs
|
|
|
|
|
|
|
|
QString passphrase = QString("HUSH3") + passphraseBlank + QString("SDL"); |
|
|
@ -667,12 +666,12 @@ void MainWindow::removeWalletEncryptionStartUp() { |
|
|
|
sequence1 = new char[length+1]; |
|
|
|
strncpy(sequence1, passphraseHash.toUtf8(), length+1); |
|
|
|
|
|
|
|
#define MESSAGE ((const unsigned char *) sequence) |
|
|
|
#define MESSAGE_LEN length |
|
|
|
#define hash ((const unsigned char *) sequence1) |
|
|
|
#define MESSAGE ((const unsigned char *) sequence) |
|
|
|
#define MESSAGE_LEN length |
|
|
|
#define hash ((const unsigned char *) sequence1) |
|
|
|
|
|
|
|
#define PASSWORD sequence |
|
|
|
#define KEY_LEN crypto_box_SEEDBYTES |
|
|
|
#define PASSWORD sequence |
|
|
|
#define KEY_LEN crypto_box_SEEDBYTES |
|
|
|
|
|
|
|
unsigned char key[KEY_LEN]; |
|
|
|
|
|
|
|