MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetKey

Method GetKey

src/wallet/scriptpubkeyman.cpp:993–1008  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

991}
992
993bool LegacyScriptPubKeyMan::GetKey(const CKeyID &address, CKey& keyOut) const
994{
995 LOCK(cs_KeyStore);
996 if (!m_storage.HasEncryptionKeys()) {
997 return FillableSigningProvider::GetKey(address, keyOut);
998 }
999
1000 CryptedKeyMap::const_iterator mi = mapCryptedKeys.find(address);
1001 if (mi != mapCryptedKeys.end())
1002 {
1003 const CPubKey &vchPubKey = (*mi).second.first;
1004 const std::vector<unsigned char> &vchCryptedSecret = (*mi).second.second;
1005 return DecryptKey(m_storage.GetEncryptionKey(), vchCryptedSecret, vchPubKey, keyOut);
1006 }
1007 return false;
1008}
1009
1010bool LegacyScriptPubKeyMan::GetKeyOrigin(const CKeyID& keyID, KeyOriginInfo& info) const
1011{

Callers 15

SignMessageMethod · 0.45
backup.cppFile · 0.45
dumpprivkeyFunction · 0.45
dumpwalletFunction · 0.45
sendtomainchain_pakFunction · 0.45
generatepegoutproofFunction · 0.45
getpegoutkeysFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
operator==Method · 0.45
FUZZ_TARGET_INITFunction · 0.45
FUZZ_TARGETFunction · 0.45

Calls 4

DecryptKeyFunction · 0.85
HasEncryptionKeysMethod · 0.80
findMethod · 0.80
endMethod · 0.45

Tested by 5

BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
operator==Method · 0.36
FUZZ_TARGET_INITFunction · 0.36
FUZZ_TARGETFunction · 0.36