MCPcopy Create free account
hub / github.com/LUX-Core/lux / SetKey

Method SetKey

src/darksend.cpp:1998–2011  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1996}
1997
1998bool 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
2013bool CDarkSendSigner::SignMessage(std::string strMessage, std::string& errorMessage, vector<unsigned char>& vchSig, CKey key) {
2014 CHashWriter ss(SER_GETHASH, 0);

Callers 2

CheckMethod · 0.45
SignMethod · 0.45

Calls 4

_Function · 0.85
SetStringMethod · 0.80
GetKeyMethod · 0.45
GetPubKeyMethod · 0.45

Tested by

no test coverage detected