#pragma once // Small dependency-free encoding helpers shared across the protocol modules. #include #include #include #include namespace Echoion::Protocol::Util { using Bytes = std::vector; using ByteView = std::span; // Standard base64 (RFC 4648) with '+' '/' and '=' padding. std::string base64Encode(ByteView data); Bytes base64Decode(const std::string& text); // Lowercase hex, no separators. std::string toHex(ByteView data); Bytes fromHex(const std::string& hex); } // namespace Echoion::Protocol::Util