MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / DecodeExtKey

Function DecodeExtKey

src/key_io.cpp:185–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185CExtKey DecodeExtKey(const std::string& str)
186{
187 CExtKey key;
188 std::vector<unsigned char> data;
189 if (DecodeBase58Check(str, data)) {
190 const std::vector<unsigned char>& prefix = Params().Base58Prefix(CChainParams::EXT_SECRET_KEY);
191 if (data.size() == BIP32_EXTKEY_SIZE + prefix.size() && std::equal(prefix.begin(), prefix.end(), data.begin())) {
192 key.Decode(data.data() + prefix.size());
193 }
194 }
195 return key;
196}
197
198std::string EncodeExtKey(const CExtKey& key)
199{

Callers 2

ParsePubkeyFunction · 0.85
RunTestFunction · 0.85

Calls 7

DecodeBase58CheckFunction · 0.85
ParamsClass · 0.70
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
DecodeMethod · 0.45
dataMethod · 0.45

Tested by 1

RunTestFunction · 0.68