From 78e97ac9dcafd37c10bba1c9abf2a04057a501de Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Sun, 4 Aug 2013 11:36:44 -0300 Subject: [PATCH] use the same message magic everywhere (to hash) --- src/main.cpp | 2 +- src/twister.cpp | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index d6ff37ca..2c463f05 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -57,7 +57,7 @@ multimap mapOrphanBlocksByPrev; // Constant stuff for coinbase transactions we create: CScript COINBASE_FLAGS; -const string strMessageMagic = "Bitcoin Signed Message:\n"; +const string strMessageMagic = "twister Signed Message:\n"; double dHashesPerSec = 0.0; int64 nHPSTimerStart = 0; diff --git a/src/twister.cpp b/src/twister.cpp index a5f4d57f..d213f456 100644 --- a/src/twister.cpp +++ b/src/twister.cpp @@ -5,8 +5,6 @@ #include -const string strTwisterMessageMagic = "twister Signed Message:\n"; - twister::twister() { } @@ -210,7 +208,7 @@ std::string createSignature(std::string &strMessage, std::string &strUsername) } CHashWriter ss(SER_GETHASH, 0); - ss << strTwisterMessageMagic; + ss << strMessageMagic; ss << strMessage; vector vchSig; @@ -260,7 +258,7 @@ bool verifySignature(std::string const &strMessage, std::string const &strUserna (const unsigned char*)strSign.data() + strSign.size()); CHashWriter ss(SER_GETHASH, 0); - ss << strTwisterMessageMagic; + ss << strMessageMagic; ss << strMessage; CPubKey pubkeyRec;