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

Function DecodeDumpString

src/wallet/rpc/backup.cpp:66–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66static std::string DecodeDumpString(const std::string &str) {
67 std::stringstream ret;
68 for (unsigned int pos = 0; pos < str.length(); pos++) {
69 unsigned char c = str[pos];
70 if (c == '%' && pos+2 < str.length()) {
71 c = (((str[pos+1]>>6)*9+((str[pos+1]-'0')&15)) << 4) |
72 ((str[pos+2]>>6)*9+((str[pos+2]-'0')&15));
73 pos += 2;
74 }
75 ret << c;
76 }
77 return ret.str();
78}
79
80static bool GetWalletAddressesForKey(const LegacyScriptPubKeyMan* spk_man, const CWallet& wallet, const CKeyID& keyid, std::string& strAddr, std::string& strLabel) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
81{

Callers 1

importwalletFunction · 0.85

Calls 1

strMethod · 0.80

Tested by

no test coverage detected