MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / AddCryptedKey

Method AddCryptedKey

src/wallet/wallet.cpp:529–544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

527}
528
529bool CWallet::AddCryptedKey(const CPubKey &vchPubKey, const std::vector<uint8_t> &vchCryptedSecret) {
530 if (!CCryptoKeyStore::AddCryptedKey(vchPubKey, vchCryptedSecret))
531 return false;
532
533 if (!fFileBacked)
534 return true;
535
536 {
537 LOCK(cs_wallet);
538 if (pWalletDbEncryption)
539 return pWalletDbEncryption->WriteCryptedKey(vchPubKey, vchCryptedSecret);
540 else
541 return CWalletDB(strWalletFile).WriteCryptedKey(vchPubKey, vchCryptedSecret);
542 }
543 return false;
544}
545
546bool CWallet::LoadCryptedKey(const CPubKey &vchPubKey, const std::vector<uint8_t> &vchCryptedSecret) {
547 return CCryptoKeyStore::AddCryptedKey(vchPubKey, vchCryptedSecret);

Callers

nothing calls this directly

Calls 2

CWalletDBClass · 0.85
WriteCryptedKeyMethod · 0.80

Tested by

no test coverage detected