mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-09-13 22:31:32 +02:00
CKey: add method to negate the key
This commit is contained in:
@@ -163,6 +163,12 @@ void CKey::MakeNewKey(bool fCompressedIn) {
|
||||
fCompressed = fCompressedIn;
|
||||
}
|
||||
|
||||
bool CKey::Negate()
|
||||
{
|
||||
assert(fValid);
|
||||
return secp256k1_ec_privkey_negate(secp256k1_context_sign, keydata.data());
|
||||
}
|
||||
|
||||
CPrivKey CKey::GetPrivKey() const {
|
||||
assert(fValid);
|
||||
CPrivKey privkey;
|
||||
|
Reference in New Issue
Block a user