MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetPubKey

Method GetPubKey

src/key.cpp:188–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 5

DeriveMethod · 0.45
NeuterMethod · 0.45
ECC_InitSanityCheckFunction · 0.45

Calls 6

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

Tested by

no test coverage detected