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

Method Decode

src/key.cpp:389–396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

387}
388
389void CExtKey::Decode(const unsigned char code[BIP32_EXTKEY_SIZE]) {
390 nDepth = code[0];
391 memcpy(vchFingerprint, code+1, 4);
392 nChild = ReadBE32(code+5);
393 memcpy(chaincode.begin(), code+9, 32);
394 key.Set(code+42, code+BIP32_EXTKEY_SIZE, true);
395 if ((nDepth == 0 && (nChild != 0 || ReadLE32(vchFingerprint) != 0)) || code[41] != 0) key = CKey();
396}
397
398bool ECC_InitSanityCheck() {
399 CKey key;

Callers 2

DecodeExtPubKeyFunction · 0.45
DecodeExtKeyFunction · 0.45

Calls 5

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

Tested by

no test coverage detected