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

Method GetKey

src/wallet/crypter.cpp:261–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261bool CCryptoKeyStore::GetKey(const CKeyID &address, CKey& keyOut) const
262{
263 LOCK(cs_KeyStore);
264 if (!IsCrypted()) {
265 return CBasicKeyStore::GetKey(address, keyOut);
266 }
267
268 CryptedKeyMap::const_iterator mi = mapCryptedKeys.find(address);
269 if (mi != mapCryptedKeys.end())
270 {
271 const CPubKey &vchPubKey = (*mi).second.first;
272 const std::vector<unsigned char> &vchCryptedSecret = (*mi).second.second;
273 return DecryptKey(vMasterKey, vchCryptedSecret, vchPubKey, keyOut);
274 }
275 return false;
276}
277
278bool CCryptoKeyStore::GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const
279{

Callers 5

signmessageFunction · 0.45
AddKeypathToMapFunction · 0.45
GetWalletAddressesForKeyFunction · 0.45
dumpprivkeyFunction · 0.45
dumpwalletFunction · 0.45

Calls 3

DecryptKeyFunction · 0.85
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected