aboutsummaryrefslogtreecommitdiff
path: root/src/keystore.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-05-14 19:07:52 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2012-05-24 19:58:12 +0200
commitfd61d6f5068cf92d34569862b4225f177049a4f0 (patch)
tree5556094bda3a7162535b9352b67016e620bb9a77 /src/keystore.h
parentf04017f702e36563b9ba05b3fede216767de580a (diff)
downloadbitcoin-fd61d6f5068cf92d34569862b4225f177049a4f0.tar.xz
Encapsulate public keys in CPubKey
Diffstat (limited to 'src/keystore.h')
-rw-r--r--src/keystore.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/keystore.h b/src/keystore.h
index 479d6c5a2e..cd72606d44 100644
--- a/src/keystore.h
+++ b/src/keystore.h
@@ -28,7 +28,7 @@ public:
virtual bool HaveKey(const CBitcoinAddress &address) const =0;
virtual bool GetKey(const CBitcoinAddress &address, CKey& keyOut) const =0;
virtual void GetKeys(std::set<CBitcoinAddress> &setAddress) const =0;
- virtual bool GetPubKey(const CBitcoinAddress &address, std::vector<unsigned char>& vchPubKeyOut) const;
+ virtual bool GetPubKey(const CBitcoinAddress &address, CPubKey& vchPubKeyOut) const;
// Support for BIP 0013 : see https://en.bitcoin.it/wiki/BIP_0013
virtual bool AddCScript(const CScript& redeemScript) =0;
@@ -98,7 +98,7 @@ public:
virtual bool GetCScript(const uint160 &hash, CScript& redeemScriptOut) const;
};
-typedef std::map<CBitcoinAddress, std::pair<std::vector<unsigned char>, std::vector<unsigned char> > > CryptedKeyMap;
+typedef std::map<CBitcoinAddress, std::pair<CPubKey, std::vector<unsigned char> > > CryptedKeyMap;
/** Keystore which keeps the private keys encrypted.
* It derives from the basic key store, which is used if no encryption is active.
@@ -146,7 +146,7 @@ public:
bool Lock();
- virtual bool AddCryptedKey(const std::vector<unsigned char> &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret);
+ virtual bool AddCryptedKey(const CPubKey &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret);
bool AddKey(const CKey& key);
bool HaveKey(const CBitcoinAddress &address) const
{
@@ -159,7 +159,7 @@ public:
return false;
}
bool GetKey(const CBitcoinAddress &address, CKey& keyOut) const;
- bool GetPubKey(const CBitcoinAddress &address, std::vector<unsigned char>& vchPubKeyOut) const;
+ bool GetPubKey(const CBitcoinAddress &address, CPubKey& vchPubKeyOut) const;
void GetKeys(std::set<CBitcoinAddress> &setAddress) const
{
if (!IsCrypted())