We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 848ec56 commit 463921bCopy full SHA for 463921b
src/key.cpp
@@ -163,6 +163,12 @@ void CKey::MakeNewKey(bool fCompressedIn) {
163
fCompressed = fCompressedIn;
164
}
165
166
+bool CKey::Negate()
167
+{
168
+ assert(fValid);
169
+ return secp256k1_ec_privkey_negate(secp256k1_context_sign, keydata.data());
170
+}
171
+
172
CPrivKey CKey::GetPrivKey() const {
173
assert(fValid);
174
CPrivKey privkey;
src/key.h
@@ -98,6 +98,9 @@ class CKey
98
//! Generate a new private key using a cryptographic PRNG.
99
void MakeNewKey(bool fCompressed);
100
101
+ //! Negate private key
102
+ bool Negate();
103
104
/**
105
* Convert the private key to a CPrivKey (serialized OpenSSL private key data).
106
* This is expensive.
0 commit comments