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

Function EncodeBase58Check

src/commons/base58.cpp:110–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110string EncodeBase58Check(const vector<unsigned char>& vchIn) {
111 // add 4-byte hash check to the end
112 vector<unsigned char> vch(vchIn);
113 uint256 hash = Hash(vch.begin(), vch.end());
114 vch.insert(vch.end(), (unsigned char*) &hash, (unsigned char*) &hash + 4);
115 return EncodeBase58(vch);
116}
117
118bool DecodeBase58Check(const char* psz, vector<unsigned char>& vchRet) {
119 if (!DecodeBase58(psz, vchRet) || (vchRet.size() < 4)) {

Callers 1

ToStringMethod · 0.85

Calls 5

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

Tested by

no test coverage detected