45 ScriptMap::const_iterator mi =
mapScripts.find(hash);
48 redeemScriptOut = (*mi).second;
89 const CPubKey &vchPubKey = (*mi).second.first;
90 const std::vector<unsigned char> &vchCryptedSecret = (*mi).second.second;
94 if (vchSecret.size() != 32)
118 std::vector<unsigned char> vchCryptedSecret;
152 const CPubKey &vchPubKey = (*mi).second.first;
153 const std::vector<unsigned char> &vchCryptedSecret = (*mi).second.second;
157 if (vchSecret.size() != 32)
159 keyOut.
Set(vchSecret.begin(), vchSecret.end(), vchPubKey.
IsCompressed());
176 vchPubKeyOut = (*mi).second.first;
191 BOOST_FOREACH(KeyMap::value_type& mKey,
mapKeys)
193 const CKey &key = mKey.second;
196 std::vector<unsigned char> vchCryptedSecret;
CCriticalSection cs_KeyStore
virtual bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey)=0
const unsigned char * begin() const
const unsigned char * end() const
std::vector< unsigned char, secure_allocator< unsigned char > > CKeyingMaterial
bool EncryptKeys(CKeyingMaterial &vMasterKeyIn)
CKeyingMaterial vMasterKey
virtual bool AddCryptedKey(const CPubKey &vchPubKey, const std::vector< unsigned char > &vchCryptedSecret)
bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey)
bool GetKey(const CKeyID &address, CKey &keyOut) const
bool GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const
virtual bool AddCScript(const CScript &redeemScript)
boost::signals2::signal< void(CCryptoKeyStore *wallet)> NotifyStatusChanged
bool GetKey(const CKeyID &address, CKey &keyOut) const
virtual bool GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const
CPubKey GetPubKey() const
An encapsulated public key.
bool Unlock(const CKeyingMaterial &vMasterKeyIn)
virtual bool GetKey(const CKeyID &address, CKey &keyOut) const =0
bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey)
virtual bool AddKey(const CKey &key)
void Set(const T pbegin, const T pend, bool fCompressedIn)
bool IsCompressed() const
CryptedKeyMap mapCryptedKeys
Serialized script, used inside transaction inputs and outputs.
bool DecryptSecret(const CKeyingMaterial &vMasterKey, const std::vector< unsigned char > &vchCiphertext, const uint256 &nIV, CKeyingMaterial &vchPlaintext)
A reference to a CKey: the Hash160 of its serialized public key.
virtual bool GetCScript(const CScriptID &hash, CScript &redeemScriptOut) const
bool EncryptSecret(const CKeyingMaterial &vMasterKey, const CKeyingMaterial &vchPlaintext, const uint256 &nIV, std::vector< unsigned char > &vchCiphertext)
A reference to a CScript: the Hash160 of its serialization (see script.h)
An encapsulated private key.
virtual bool HaveCScript(const CScriptID &hash) const