mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Do not use obsolete CPrivKey for passing keys around
This commit is contained in:
committed by
Matt Corallo
parent
b6b039d84e
commit
0efda1a79e
16
src/key.h
16
src/key.h
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user