X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fqt%2Fsignverifymessagedialog.cpp;h=7f397636a758920bcf86d7e239fd56f3dbf0c07f;hb=d11ccde30fb92a4905899af679be86fb61e02ada;hp=8d011ab8faf142a6ceffa2f7c893b4032be680f0;hpb=62b3df9c02e86432aa73f8b475900946bb348816;p=novacoin.git diff --git a/src/qt/signverifymessagedialog.cpp b/src/qt/signverifymessagedialog.cpp index 8d011ab..7f39763 100644 --- a/src/qt/signverifymessagedialog.cpp +++ b/src/qt/signverifymessagedialog.cpp @@ -140,12 +140,12 @@ void SignVerifyMessageDialog::on_signMessageButton_SM_clicked() return; } - CDataStream ss(SER_GETHASH, 0); + CHashWriter ss(SER_GETHASH, 0); ss << strMessageMagic; ss << ui->messageIn_SM->document()->toPlainText().toStdString(); std::vector vchSig; - if (!key.SignCompact(Hash(ss.begin(), ss.end()), vchSig)) + if (!key.SignCompact(ss.GetHash(), vchSig)) { ui->statusLabel_SM->setStyleSheet("QLabel { color: red; }"); ui->statusLabel_SM->setText(QString("") + tr("Message signing failed.") + QString("")); @@ -216,12 +216,12 @@ void SignVerifyMessageDialog::on_verifyMessageButton_VM_clicked() return; } - CDataStream ss(SER_GETHASH, 0); + CHashWriter ss(SER_GETHASH, 0); ss << strMessageMagic; ss << ui->messageIn_VM->document()->toPlainText().toStdString(); - CKey key; - if (!key.SetCompactSignature(Hash(ss.begin(), ss.end()), vchSig)) + CPubKey key; + if (!key.SetCompactSignature(ss.GetHash(), vchSig)) { ui->signatureIn_VM->setValid(false); ui->statusLabel_VM->setStyleSheet("QLabel { color: red; }"); @@ -229,7 +229,7 @@ void SignVerifyMessageDialog::on_verifyMessageButton_VM_clicked() return; } - if (!(CBitcoinAddress(key.GetPubKey().GetID()) == addr)) + if (!(CBitcoinAddress(key.GetID()) == addr)) { ui->statusLabel_VM->setStyleSheet("QLabel { color: red; }"); ui->statusLabel_VM->setText(QString("") + tr("Message verification failed.") + QString(""));