Bitcoin Core
0.18.99
P2P Digital Currency
|
Keystore which keeps the private keys encrypted. More...
#include <crypter.h>
Public Member Functions | |
CCryptoKeyStore () | |
bool | IsCrypted () const |
bool | IsLocked () const |
bool | Lock () |
virtual bool | AddCryptedKey (const CPubKey &vchPubKey, const std::vector< unsigned char > &vchCryptedSecret) |
bool | AddKeyPubKey (const CKey &key, const CPubKey &pubkey) override |
Add a key to the store. More... | |
bool | HaveKey (const CKeyID &address) const override |
Check whether a key corresponding to a given address is present in the store. More... | |
bool | GetKey (const CKeyID &address, CKey &keyOut) const override |
bool | GetPubKey (const CKeyID &address, CPubKey &vchPubKeyOut) const override |
std::set< CKeyID > | GetKeys () const override |
Public Member Functions inherited from CBasicKeyStore | |
bool | AddKey (const CKey &key) |
bool | AddCScript (const CScript &redeemScript) override |
Support for BIP 0013 : see https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki. More... | |
bool | HaveCScript (const CScriptID &hash) const override |
std::set< CScriptID > | GetCScripts () const override |
bool | GetCScript (const CScriptID &hash, CScript &redeemScriptOut) const override |
bool | AddWatchOnly (const CScript &dest) override |
Support for Watch-only addresses. More... | |
bool | RemoveWatchOnly (const CScript &dest) override |
bool | HaveWatchOnly (const CScript &dest) const override |
bool | HaveWatchOnly () const override |
Public Member Functions inherited from SigningProvider | |
virtual | ~SigningProvider () |
virtual bool | GetKeyOrigin (const CKeyID &keyid, KeyOriginInfo &info) const |
Public Attributes | |
boost::signals2::signal< void(CCryptoKeyStore *wallet)> | NotifyStatusChanged |
Wallet status (encrypted, locked) changed. More... | |
Protected Types | |
using | CryptedKeyMap = std::map< CKeyID, std::pair< CPubKey, std::vector< unsigned char > >> |
Protected Types inherited from CBasicKeyStore | |
using | KeyMap = std::map< CKeyID, CKey > |
using | WatchKeyMap = std::map< CKeyID, CPubKey > |
using | ScriptMap = std::map< CScriptID, CScript > |
using | WatchOnlySet = std::set< CScript > |
Protected Member Functions | |
bool | SetCrypted () |
bool | EncryptKeys (CKeyingMaterial &vMasterKeyIn) |
will encrypt previously unencrypted keys More... | |
bool | Unlock (const CKeyingMaterial &vMasterKeyIn, bool accept_no_keys=false) |
CryptedKeyMap mapCryptedKeys | GUARDED_BY (cs_KeyStore) |
Protected Member Functions inherited from CBasicKeyStore | |
KeyMap mapKeys | GUARDED_BY (cs_KeyStore) |
WatchKeyMap mapWatchKeys | GUARDED_BY (cs_KeyStore) |
ScriptMap mapScripts | GUARDED_BY (cs_KeyStore) |
WatchOnlySet setWatchOnly | GUARDED_BY (cs_KeyStore) |
void | ImplicitlyLearnRelatedKeyScripts (const CPubKey &pubkey) EXCLUSIVE_LOCKS_REQUIRED(cs_KeyStore) |
Private Member Functions | |
CKeyingMaterial vMasterKey | GUARDED_BY (cs_KeyStore) |
Private Attributes | |
std::atomic< bool > | fUseCrypto |
if fUseCrypto is true, mapKeys must be empty if fUseCrypto is false, vMasterKey must be empty More... | |
bool | fDecryptionThoroughlyChecked |
keeps track of whether Unlock has run a thorough check before More... | |
Additional Inherited Members | |
Protected Attributes inherited from CBasicKeyStore | |
CCriticalSection | cs_KeyStore |
Keystore which keeps the private keys encrypted.
It derives from the basic key store, which is used if no encryption is active.
|
protected |
|
virtual |
Reimplemented in CWallet.
Definition at line 240 of file crypter.cpp.
Add a key to the store.
Reimplemented from CBasicKeyStore.
Reimplemented in CWallet.
Definition at line 216 of file crypter.cpp.
|
protected |
will encrypt previously unencrypted keys
Definition at line 307 of file crypter.cpp.
Reimplemented from CBasicKeyStore.
Definition at line 261 of file crypter.cpp.
|
overridevirtual |
Reimplemented from CBasicKeyStore.
Definition at line 294 of file crypter.cpp.
|
overridevirtual |
Reimplemented from CBasicKeyStore.
Definition at line 278 of file crypter.cpp.
|
private |
|
protected |
|
overridevirtual |
Check whether a key corresponding to a given address is present in the store.
Reimplemented from CBasicKeyStore.
Definition at line 252 of file crypter.cpp.
|
inline |
bool CCryptoKeyStore::IsLocked | ( | ) | const |
bool CCryptoKeyStore::Lock | ( | ) |
|
protected |
Definition at line 144 of file crypter.cpp.
|
protected |
Definition at line 178 of file crypter.cpp.
|
private |
|
private |
boost::signals2::signal<void (CCryptoKeyStore* wallet)> CCryptoKeyStore::NotifyStatusChanged |