Do not use obsolete CPrivKey for passing keys around

This commit is contained in:
Pieter Wuille
2011-07-03 15:33:01 +02:00
committed by Matt Corallo
parent b6b039d84e
commit 0efda1a79e
4 changed files with 12 additions and 30 deletions

View File

@@ -220,22 +220,6 @@ public:
return false;
return true;
}
static bool Sign(const CPrivKey& vchPrivKey, uint256 hash, std::vector<unsigned char>& vchSig)
{
CKey key;
if (!key.SetPrivKey(vchPrivKey))
return false;
return key.Sign(hash, vchSig);
}
static bool Verify(const std::vector<unsigned char>& vchPubKey, uint256 hash, const std::vector<unsigned char>& vchSig)
{
CKey key;
if (!key.SetPubKey(vchPubKey))
return false;
return key.Verify(hash, vchSig);
}
};
#endif