| 1996 | } |
| 1997 | |
| 1998 | bool CDarkSendSigner::SetKey(std::string strSecret, std::string& errorMessage, CKey& key, CPubKey& pubkey) { |
| 1999 | CBitcoinSecret vchSecret; |
| 2000 | bool fGood = vchSecret.SetString(strSecret); |
| 2001 | |
| 2002 | if (!fGood) { |
| 2003 | errorMessage = _("Invalid private key."); |
| 2004 | return false; |
| 2005 | } |
| 2006 | |
| 2007 | key = vchSecret.GetKey(); |
| 2008 | pubkey = key.GetPubKey(); |
| 2009 | |
| 2010 | return true; |
| 2011 | } |
| 2012 | |
| 2013 | bool CDarkSendSigner::SignMessage(std::string strMessage, std::string& errorMessage, vector<unsigned char>& vchSig, CKey key) { |
| 2014 | CHashWriter ss(SER_GETHASH, 0); |