10USERVER_NAMESPACE_BEGIN
12namespace utils::encoding {
45void ToHex(std::string_view input, std::string& out)
noexcept;
49inline std::string
ToHex(std::string_view data)
noexcept {
58inline std::string
ToHex(
const void* encoded, size_t len)
noexcept {
59 const auto* chars =
reinterpret_cast<
const char*>(encoded);
60 return ToHex(std::string_view{chars, len});
78inline std::string
FromHex(std::string_view encoded)
noexcept {
80 FromHex(encoded, result);
96inline std::string
ToHexString(uint64_t value) {
return ToHex(&value,
sizeof(value)); }