Skip to content

Commit

Permalink
Merge pull request #6484
Browse files Browse the repository at this point in the history
5e56ef5 qt: use CHashWriter also in SignVerifyMessageDialog (Pavel Vasin)
  • Loading branch information
laanwj committed Jul 28, 2015
2 parents 08e9c57 + 5e56ef5 commit 1369d69
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/qt/signverifymessagedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,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<unsigned char> 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("<nobr>") + tr("Message signing failed.") + QString("</nobr>"));
Expand Down Expand Up @@ -223,12 +223,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();

CPubKey pubkey;
if (!pubkey.RecoverCompact(Hash(ss.begin(), ss.end()), vchSig))
if (!pubkey.RecoverCompact(ss.GetHash(), vchSig))
{
ui->signatureIn_VM->setValid(false);
ui->statusLabel_VM->setStyleSheet("QLabel { color: red; }");
Expand Down

0 comments on commit 1369d69

Please sign in to comment.