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

Function EncodeSecret

src/key_io.cpp:399–410  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397}
398
399std::string EncodeSecret(const CKey& key)
400{
401 assert(key.IsValid());
402 std::vector<unsigned char> data = Params().Base58Prefix(CChainParams::SECRET_KEY);
403 data.insert(data.end(), key.begin(), key.end());
404 if (key.IsCompressed()) {
405 data.push_back(1);
406 }
407 std::string ret = EncodeBase58Check(data);
408 memory_cleanse(data.data(), data.size());
409 return ret;
410}
411
412CExtPubKey DecodeExtPubKey(const std::string& str)
413{

Callers 11

AddKeyFunction · 0.85
CreateSyncedWalletFunction · 0.85
dumpprivkeyFunction · 0.85
dumpwalletFunction · 0.85
getpegoutkeysFunction · 0.85
ToPrivateStringMethod · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85
ConsumeScalarRPCArgumentFunction · 0.85
TestGUIFunction · 0.85

Calls 11

EncodeBase58CheckFunction · 0.85
memory_cleanseFunction · 0.85
ParamsClass · 0.70
IsValidMethod · 0.45
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45
IsCompressedMethod · 0.45
push_backMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by 7

AddKeyFunction · 0.68
CreateSyncedWalletFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
FUZZ_TARGET_INITFunction · 0.68
FUZZ_TARGET_INITFunction · 0.68
ConsumeScalarRPCArgumentFunction · 0.68
TestGUIFunction · 0.68