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

Method GetPubKey

src/key.cpp:179–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 4

DeriveMethod · 0.45
NeuterMethod · 0.45
ECC_InitSanityCheckFunction · 0.45
AddKeyMethod · 0.45

Calls 5

beginMethod · 0.45
sizeMethod · 0.45
IsValidMethod · 0.45

Tested by

no test coverage detected