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

Method Decompress

src/pubkey.cpp:327–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325}
326
327bool CPubKey::Decompress() {
328 if (!IsValid())
329 return false;
330 secp256k1_pubkey pubkey;
331 if (!secp256k1_ec_pubkey_parse(secp256k1_context_static, &pubkey, vch, size())) {
332 return false;
333 }
334 unsigned char pub[SIZE];
335 size_t publen = SIZE;
336 secp256k1_ec_pubkey_serialize(secp256k1_context_static, pub, &publen, &pubkey, SECP256K1_EC_UNCOMPRESSED);
337 Set(pub, pub + publen);
338 return true;
339}
340
341bool CPubKey::Derive(CPubKey& pubkeyChild, ChainCode &ccChild, unsigned int nChild, const ChainCode& cc, uint256* bip32_tweak_out) const {
342 assert(IsValid());

Callers 3

DecompressScriptFunction · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80
key.cppFile · 0.80

Calls 3

sizeFunction · 0.85

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.64