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

Method Encode

src/key.cpp:390–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388}
389
390void CExtKey::Encode(unsigned char code[BIP32_EXTKEY_SIZE]) const {
391 code[0] = nDepth;
392 memcpy(code+1, vchFingerprint, 4);
393 WriteBE32(code+5, nChild);
394 memcpy(code+9, chaincode.begin(), 32);
395 code[41] = 0;
396 assert(key.size() == 32);
397 memcpy(code+42, key.begin(), 32);
398}
399
400void CExtKey::Decode(const unsigned char code[BIP32_EXTKEY_SIZE]) {
401 nDepth = code[0];

Callers 2

EncodeExtPubKeyFunction · 0.45
EncodeExtKeyFunction · 0.45

Calls 3

WriteBE32Function · 0.85
beginMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected