MCPcopy Create free account
hub / github.com/citp/BlockSci / EncodeBase58Check

Function EncodeBase58Check

src/scripts/bitcoin_base58.cpp:123–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121 }
122
123 std::string EncodeBase58Check(const std::vector<unsigned char>& vchIn)
124 {
125 // add 4-byte hash check to the end
126 std::vector<unsigned char> vch(vchIn);
127 uint256 hash = doubleSha256(reinterpret_cast<const char*>(vch.data()), vch.size());
128 vch.insert(vch.end(), reinterpret_cast<unsigned char*>(&hash), reinterpret_cast<unsigned char*>(&hash) + 4);
129 return EncodeBase58(vch);
130 }
131
132 bool DecodeBase58Check(const char* psz, std::vector<unsigned char>& vchRet)
133 {

Callers 1

ToStringMethod · 0.85

Calls 5

doubleSha256Function · 0.85
EncodeBase58Function · 0.85
insertMethod · 0.80
sizeMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected