| 129 | } |
| 130 | |
| 131 | std::string EncodeBase58Check(const std::vector<unsigned char>& vchIn) |
| 132 | { |
| 133 | // add 4-byte hash check to the end |
| 134 | std::vector<unsigned char> vch(vchIn); |
| 135 | uint256 hash = Hash(vch.begin(), vch.end()); |
| 136 | vch.insert(vch.end(), (unsigned char*)&hash, (unsigned char*)&hash + 4); |
| 137 | return EncodeBase58(vch); |
| 138 | } |
| 139 | |
| 140 | bool DecodeBase58Check(const char* psz, std::vector<unsigned char>& vchRet) |
| 141 | { |
no test coverage detected