MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / EncodeBase58Check

Function EncodeBase58Check

src/base58.cpp:137–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 8

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

Calls 6

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

Tested by 2

FUZZ_TARGETFunction · 0.68
ConsumeScalarRPCArgumentFunction · 0.68