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

Method GetPubKey

src/key.cpp:156–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156CPubKey CKey::GetPubKey() const {
157 assert(fValid);
158 secp256k1_pubkey pubkey;
159 size_t clen = 65;
160 CPubKey result;
161 int ret = secp256k1_ec_pubkey_create(secp256k1_context_sign, &pubkey, begin());
162 assert(ret);
163 secp256k1_ec_pubkey_serialize(secp256k1_context_sign, (unsigned char*)result.begin(), &clen, &pubkey, fCompressed ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED);
164 assert(result.size() == clen);
165 assert(result.IsValid());
166 return result;
167}
168
169bool CKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig, uint32_t test_case) const {
170 if (!fValid)

Callers 5

operator()Method · 0.45
DeriveMethod · 0.45
NeuterMethod · 0.45
ECC_InitSanityCheckFunction · 0.45

Calls 5

beginMethod · 0.45
sizeMethod · 0.45
IsValidMethod · 0.45

Tested by

no test coverage detected