MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / GetKey

Method GetKey

src/wallet/crypter.cpp:235–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235bool CCryptoKeyStore::GetKey(const CKeyID &address, CKey& keyOut) const
236{
237 {
238 LOCK(cs_KeyStore);
239 if (!IsCrypted())
240 return CBasicKeyStore::GetKey(address, keyOut);
241
242 CryptedKeyMap::const_iterator mi = mapCryptedKeys.find(address);
243 if (mi != mapCryptedKeys.end())
244 {
245 const CPubKey &vchPubKey = (*mi).second.first;
246 const std::vector<unsigned char> &vchCryptedSecret = (*mi).second.second;
247 return DecryptKey(vMasterKey, vchCryptedSecret, vchPubKey, keyOut);
248 }
249 }
250 return false;
251}
252
253bool CCryptoKeyStore::GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const
254{

Callers 11

signmessageFunction · 0.45
importprivkeyFunction · 0.45
importwalletFunction · 0.45
dumpprivkeyFunction · 0.45
dumpwalletFunction · 0.45
CreateSigMethod · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45

Calls 3

DecryptKeyFunction · 0.85
findMethod · 0.80
endMethod · 0.45

Tested by 4

BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36