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

Function EncodeBase64

src/utilstrencodings.cpp:127–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127std::string EncodeBase64(const unsigned char* pch, size_t len)
128{
129 static const char *pbase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
130
131 std::string str;
132 str.reserve(((len + 2) / 3) * 4);
133 ConvertBits<8, 6, true>([&](int v) { str += pbase64[v]; }, pch, pch + len);
134 while (str.size() % 4) str += '=';
135 return str;
136}
137
138std::string EncodeBase64(const std::string& str)
139{

Callers 11

CallRPCFunction · 0.85
signmessageFunction · 0.85
walletprocesspsbtFunction · 0.85
walletcreatefundedpsbtFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
combinepsbtFunction · 0.85
finalizepsbtFunction · 0.85
createpsbtFunction · 0.85
converttopsbtFunction · 0.85
signmessagewithprivkeyFunction · 0.85

Calls 2

reserveMethod · 0.45
sizeMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68