MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / GetPubKey

Method GetPubKey

src/key.cpp:182–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180}
181
182CPubKey CKey::GetPubKey() const {
183 assert(keydata);
184 secp256k1_pubkey pubkey;
185 size_t clen = CPubKey::SIZE;
186 CPubKey result;
187 int ret = secp256k1_ec_pubkey_create(secp256k1_context_sign, &pubkey, UCharCast(begin()));
188 assert(ret);
189 secp256k1_ec_pubkey_serialize(secp256k1_context_static, (unsigned char*)result.begin(), &clen, &pubkey, fCompressed ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED);
190 assert(result.size() == clen);
191 assert(result.IsValid());
192 return result;
193}
194
195// Check that the sig has a low R value and will be less than 71 bytes
196bool SigHasLowR(const secp256k1_ecdsa_signature* sig)

Callers 8

operator==Method · 0.45
operator<Method · 0.45
CreateMuSig2NonceFunction · 0.45
CreateMuSig2PartialSigFunction · 0.45
DeriveMethod · 0.45
NeuterMethod · 0.45
ECC_InitSanityCheckFunction · 0.45
operator()Method · 0.45

Calls 7

UCharCastFunction · 0.85
beginFunction · 0.85
beginMethod · 0.45
sizeMethod · 0.45
IsValidMethod · 0.45

Tested by

no test coverage detected