Anoncoin  0.9.4
P2P Digital Currency
Public Member Functions | Public Attributes | Protected Member Functions | Private Attributes | List of all members
CCryptoKeyStore Class Reference

Keystore which keeps the private keys encrypted. More...

#include <crypter.h>

Inheritance diagram for CCryptoKeyStore:
[legend]
Collaboration diagram for CCryptoKeyStore:
[legend]

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)
 
bool HaveKey (const CKeyID &address) const
 
bool GetKey (const CKeyID &address, CKey &keyOut) const
 
bool GetPubKey (const CKeyID &address, CPubKey &vchPubKeyOut) const
 
void GetKeys (std::set< CKeyID > &setAddress) const
 
- Public Member Functions inherited from CBasicKeyStore
bool AddKeyPubKey (const CKey &key, const CPubKey &pubkey)
 
bool HaveKey (const CKeyID &address) const
 
void GetKeys (std::set< CKeyID > &setAddress) const
 
bool GetKey (const CKeyID &address, CKey &keyOut) const
 
virtual bool AddCScript (const CScript &redeemScript)
 
virtual bool HaveCScript (const CScriptID &hash) const
 
virtual bool GetCScript (const CScriptID &hash, CScript &redeemScriptOut) const
 
virtual bool AddWatchOnly (const CScript &dest)
 
virtual bool RemoveWatchOnly (const CScript &dest)
 
virtual bool HaveWatchOnly (const CScript &dest) const
 
virtual bool HaveWatchOnly () const
 
- Public Member Functions inherited from CKeyStore
virtual ~CKeyStore ()
 
virtual bool AddKey (const CKey &key)
 

Public Attributes

boost::signals2::signal< void(CCryptoKeyStore *wallet)> NotifyStatusChanged
 

Protected Member Functions

bool SetCrypted ()
 
bool EncryptKeys (CKeyingMaterial &vMasterKeyIn)
 
bool Unlock (const CKeyingMaterial &vMasterKeyIn)
 

Private Attributes

CryptedKeyMap mapCryptedKeys
 
CKeyingMaterial vMasterKey
 
bool fUseCrypto
 

Additional Inherited Members

- Protected Attributes inherited from CBasicKeyStore
KeyMap mapKeys
 
ScriptMap mapScripts
 
WatchOnlySet setWatchOnly
 
- Protected Attributes inherited from CKeyStore
CCriticalSection cs_KeyStore
 

Detailed Description

Keystore which keeps the private keys encrypted.

It derives from the basic key store, which is used if no encryption is active.

Definition at line 114 of file crypter.h.

Constructor & Destructor Documentation

CCryptoKeyStore::CCryptoKeyStore ( )
inline

Definition at line 134 of file crypter.h.

Member Function Documentation

bool CCryptoKeyStore::AddCryptedKey ( const CPubKey vchPubKey,
const std::vector< unsigned char > &  vchCryptedSecret 
)
virtual

Reimplemented in CWallet.

Definition at line 200 of file crypter.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CCryptoKeyStore::AddKeyPubKey ( const CKey key,
const CPubKey pubkey 
)
virtual

Implements CKeyStore.

Reimplemented in CWallet.

Definition at line 178 of file crypter.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CCryptoKeyStore::EncryptKeys ( CKeyingMaterial vMasterKeyIn)
protected

Definition at line 253 of file crypter.cpp.

Here is the call graph for this function:

bool CCryptoKeyStore::GetKey ( const CKeyID address,
CKey keyOut 
) const
virtual

Implements CKeyStore.

Definition at line 212 of file crypter.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CCryptoKeyStore::GetKeys ( std::set< CKeyID > &  setAddress) const
inlinevirtual

Implements CKeyStore.

Definition at line 171 of file crypter.h.

Here is the call graph for this function:

bool CCryptoKeyStore::GetPubKey ( const CKeyID address,
CPubKey vchPubKeyOut 
) const
virtual

Reimplemented from CKeyStore.

Definition at line 236 of file crypter.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CCryptoKeyStore::HaveKey ( const CKeyID address) const
inlinevirtual

Implements CKeyStore.

Definition at line 159 of file crypter.h.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CCryptoKeyStore::IsCrypted ( ) const
inline

Definition at line 138 of file crypter.h.

Here is the caller graph for this function:

bool CCryptoKeyStore::IsLocked ( ) const
inline

Definition at line 143 of file crypter.h.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CCryptoKeyStore::Lock ( )

Definition at line 135 of file crypter.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CCryptoKeyStore::SetCrypted ( )
protected

Definition at line 124 of file crypter.cpp.

Here is the caller graph for this function:

bool CCryptoKeyStore::Unlock ( const CKeyingMaterial vMasterKeyIn)
protected

Definition at line 149 of file crypter.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

bool CCryptoKeyStore::fUseCrypto
private

Definition at line 123 of file crypter.h.

CryptedKeyMap CCryptoKeyStore::mapCryptedKeys
private

Definition at line 117 of file crypter.h.

boost::signals2::signal<void (CCryptoKeyStore* wallet)> CCryptoKeyStore::NotifyStatusChanged

Definition at line 190 of file crypter.h.

CKeyingMaterial CCryptoKeyStore::vMasterKey
private

Definition at line 119 of file crypter.h.


The documentation for this class was generated from the following files: