feat: add debug output for protocol version signature computation

This commit is contained in:
MayaTheShy
2025-11-08 18:36:47 -05:00
parent 8ac50bba74
commit 5722f85902

View File

@@ -475,6 +475,18 @@ std::vector<uint8_t> NLPacket::computeProtocolVersionSignature() {
buffer.push_back(version);
}
// Debug: print buffer being hashed
static bool printed = false;
if (!printed) {
std::cout << "[OverteClient] Protocol signature input (" << buffer.size() << " bytes): ";
for (size_t i = 0; i < std::min(size_t(20), buffer.size()); i++) {
printf("%02x ", buffer[i]);
}
if (buffer.size() > 20) std::cout << "...";
std::cout << std::endl;
printed = true;
}
// Compute MD5 hash
std::vector<uint8_t> hash(MD5_DIGEST_LENGTH);
MD5(buffer.data(), buffer.size(), hash.data());