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