| 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 | { |
no test coverage detected