aboutsummaryrefslogtreecommitdiff
path: root/src/util/message.cpp
Commit message (Collapse)AuthorAgeFilesLines
* util: make EncodeBase64 consume SpansSebastian Falbesoner2020-08-251-1/+1
|
* Move direct calls to MessageSign into new SignMessage functions in CWallet ↵Andrew Chow2020-03-091-0/+14
| | | | | | | and ScriptPubKeyMan Instead of getting a SigningProvider and then going to MessageSign, have ScriptPubKeyMan handle the message signing internally.
* Refactor message hashing into a utility functionJeffrey Czyz2020-02-141-11/+15
| | | | | | | | | And add unit test for it. The purpose of using a preamble or "magic" text as part of signing and verifying a message was not given when the code was repeated in a few locations. Make a test showing how it is used to prevent inadvertently signing a transaction.
* Deduplicate the message signing codeVasil Dimov2020-02-141-0/+21
| | | | | | | | | | | | | | | | | | | | The logic of signing a message was duplicated in 3 places: src/qt/signverifymessagedialog.cpp SignVerifyMessageDialog::on_signMessageButton_SM_clicked() src/rpc/misc.cpp signmessagewithprivkey() src/wallet/rpcwallet.cpp signmessage() Move the logic into src/util/message.cpp MessageSign() and call it from all the 3 places.
* Deduplicate the message verifying codeVasil Dimov2020-02-141-0/+53
The logic of verifying a message was duplicated in 2 places: src/qt/signverifymessagedialog.cpp SignVerifyMessageDialog::on_verifyMessageButton_VM_clicked() src/rpc/misc.cpp verifymessage() with the only difference being the result handling. Move the logic into a dedicated src/util/message.cpp MessageVerify() which returns a set of result codes, call it from the 2 places and just handle the results differently in the callers.