16 #include "validation.h" 28 platformStyle(platformStyle)
32 #if QT_VERSION >= 0x040700 33 ui->
signatureOut_SM->setPlaceholderText(tr(
"Click \"Sign Message\" to generate signature"));
38 #ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac 137 ui->
statusLabel_SM->setText(tr(
"The entered address is invalid.") + QString(
" ") + tr(
"Please check the address and try again."));
141 if (!addr.GetKeyID(keyID))
145 ui->
statusLabel_SM->setText(tr(
"The entered address does not refer to a key.") + QString(
" ") + tr(
"Please check the address and try again."));
161 ui->
statusLabel_SM->setText(tr(
"Private key for the entered address is not available."));
169 std::vector<unsigned char> vchSig;
173 ui->
statusLabel_SM->setText(QString(
"<nobr>") + tr(
"Message signing failed.") + QString(
"</nobr>"));
178 ui->
statusLabel_SM->setText(QString(
"<nobr>") + tr(
"Message signed.") + QString(
"</nobr>"));
217 ui->
statusLabel_VM->setText(tr(
"The entered address is invalid.") + QString(
" ") + tr(
"Please check the address and try again."));
221 if (!addr.GetKeyID(keyID))
225 ui->
statusLabel_VM->setText(tr(
"The entered address does not refer to a key.") + QString(
" ") + tr(
"Please check the address and try again."));
229 bool fInvalid =
false;
236 ui->
statusLabel_VM->setText(tr(
"The signature could not be decoded.") + QString(
" ") + tr(
"Please check the signature and try again."));
249 ui->
statusLabel_VM->setText(tr(
"The signature did not match the message digest.") + QString(
" ") + tr(
"Please check the signature and try again."));
256 ui->
statusLabel_VM->setText(QString(
"<nobr>") + tr(
"Message verification failed.") + QString(
"</nobr>"));
261 ui->
statusLabel_VM->setText(QString(
"<nobr>") + tr(
"Message verified.") + QString(
"</nobr>"));
276 if (event->type() == QEvent::MouseButtonPress ||
event->type() == QEvent::FocusIn)
296 return QDialog::eventFilter(
object, event);
void setAddress_VM(const QString &address)
void on_clearButton_VM_clicked()
QPushButton * addressBookButton_VM
void showTab_SM(bool fShow)
const PlatformStyle * platformStyle
SignVerifyMessageDialog(const PlatformStyle *platformStyle, QWidget *parent)
QPushButton * addressBookButton_SM
CKeyID GetID() const
Get the KeyID of this public key (hash of its serialization)
void on_verifyMessageButton_VM_clicked()
void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent)
string EncodeBase64(const unsigned char *pch, size_t len)
bool RecoverCompact(const uint256 &hash, const std::vector< unsigned char > &vchSig)
Recover a public key from a compact signature.
QLineEdit * signatureOut_SM
bool GetKey(const CKeyID &address, CKey &keyOut) const
GetKey implementation that can derive a HD private key on the fly.
void setupUi(QDialog *SignVerifyMessageDialog)
bool eventFilter(QObject *object, QEvent *event)
void setClipboard(const QString &str)
vector< unsigned char > DecodeBase64(const char *p, bool *pfInvalid)
QValidatedLineEdit * addressIn_VM
static secp256k1_context * ctx
QValidatedLineEdit * signatureIn_VM
void on_signMessageButton_SM_clicked()
~SignVerifyMessageDialog()
QValidatedLineEdit * addressIn_SM
void on_addressBookButton_SM_clicked()
QPlainTextEdit * messageIn_VM
QPushButton * clearButton_SM
void on_copySignatureButton_SM_clicked()
QPushButton * copySignatureButton_SM
void setAddress_SM(const QString &address)
Ui::SignVerifyMessageDialog * ui
const QString & getReturnValue() const
void showTab_VM(bool fShow)
QPushButton * signMessageButton_SM
void on_pasteButton_SM_clicked()
void setValid(bool valid)
QPushButton * verifyMessageButton_VM
void on_clearButton_SM_clicked()
QPlainTextEdit * messageIn_SM
void setModel(WalletModel *model)
QPushButton * clearButton_VM
void on_addressBookButton_VM_clicked()
const string strMessageMagic
AddressTableModel * getAddressTableModel()
QPushButton * pasteButton_SM
void setModel(AddressTableModel *model)
UnlockContext requestUnlock(bool fForMixingOnly=false)