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

Method Decode

src/key.cpp:400–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398}
399
400void CExtKey::Decode(const unsigned char code[BIP32_EXTKEY_SIZE]) {
401 nDepth = code[0];
402 memcpy(vchFingerprint, code+1, 4);
403 nChild = ReadBE32(code+5);
404 memcpy(chaincode.begin(), code+9, 32);
405 key.Set(code+42, code+BIP32_EXTKEY_SIZE, true);
406 if ((nDepth == 0 && (nChild != 0 || ReadLE32(vchFingerprint) != 0)) || code[41] != 0) key = CKey();
407}
408
409KeyPair::KeyPair(const CKey& key, const uint256* merkle_root)
410{

Callers 2

DecodeExtPubKeyFunction · 0.45
DecodeExtKeyFunction · 0.45

Calls 5

ReadBE32Function · 0.85
ReadLE32Function · 0.85
CKeyClass · 0.70
beginMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected