Changeset View
Changeset View
Standalone View
Standalone View
src/cashaddr.cpp
Show First 20 Lines • Show All 286 Lines • ▼ Show 20 Lines | std::pair<std::string, data> Decode(const std::string &str) { | ||||
// Verify the checksum. | // Verify the checksum. | ||||
if (!VerifyChecksum(prefix, values)) { | if (!VerifyChecksum(prefix, values)) { | ||||
return {}; | return {}; | ||||
} | } | ||||
return {prefix, data(values.begin(), values.end() - 8)}; | return {prefix, data(values.begin(), values.end() - 8)}; | ||||
} | } | ||||
std::vector<uint8_t> EncodingCharset() { | |||||
const size_t size = 32; | |||||
return std::vector<uint8_t>(CHARSET, CHARSET + size); | |||||
} | |||||
} // namespace cashaddr | } // namespace cashaddr |