[netaddress] Make OnionToString public

This commit is contained in:
dergoegge 2022-11-17 14:38:39 +00:00
parent 7ef730ca84
commit c9ba3f836e
2 changed files with 3 additions and 1 deletions

View File

@ -588,7 +588,7 @@ static std::string IPv6ToString(Span<const uint8_t> a, uint32_t scope_id)
return r; return r;
} }
static std::string OnionToString(Span<const uint8_t> addr) std::string OnionToString(Span<const uint8_t> addr)
{ {
uint8_t checksum[torv3::CHECKSUM_LEN]; uint8_t checksum[torv3::CHECKSUM_LEN];
torv3::Checksum(addr, checksum); torv3::Checksum(addr, checksum);

View File

@ -111,6 +111,8 @@ static constexpr size_t ADDR_INTERNAL_SIZE = 10;
/// SAM 3.1 and earlier do not support specifying ports and force the port to 0. /// SAM 3.1 and earlier do not support specifying ports and force the port to 0.
static constexpr uint16_t I2P_SAM31_PORT{0}; static constexpr uint16_t I2P_SAM31_PORT{0};
std::string OnionToString(Span<const uint8_t> addr);
/** /**
* Network address. * Network address.
*/ */