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

Function EncodeBase58Check

src/base58.cpp:135–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135std::string EncodeBase58Check(Span<const unsigned char> input)
136{
137 // add 4-byte hash check to the end
138 std::vector<unsigned char> vch(input.begin(), input.end());
139 uint256 hash = Hash(vch);
140 vch.insert(vch.end(), (unsigned char*)&hash, (unsigned char*)&hash + 4);
141 return EncodeBase58(vch);
142}
143
144[[nodiscard]] static bool DecodeBase58Check(const char* psz, std::vector<unsigned char>& vchRet, int max_ret_len)
145{

Callers 9

operator()Method · 0.85
EncodeSecretFunction · 0.85
EncodeExtPubKeyFunction · 0.85
EncodeExtKeyFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85
ConsumeScalarRPCArgumentFunction · 0.85
decodepsbtFunction · 0.85
Base58CheckEncodeFunction · 0.85

Calls 5

EncodeBase58Function · 0.85
HashFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by 3

BOOST_AUTO_TEST_CASEFunction · 0.68
FUZZ_TARGET_INITFunction · 0.68
ConsumeScalarRPCArgumentFunction · 0.68