From d5d7fbdb79fba4d1d9c2838f505a6823dd519d60 Mon Sep 17 00:00:00 2001 From: Ivan Date: Thu, 20 Nov 2025 17:57:07 -0600 Subject: [PATCH] refactor: simplify comments in getHashablePart function for clarity --- pkg/packet/packet.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/packet/packet.go b/pkg/packet/packet.go index ef1465d..2f0f7ad 100644 --- a/pkg/packet/packet.go +++ b/pkg/packet/packet.go @@ -202,14 +202,14 @@ func (p *Packet) GetHash() []byte { func (p *Packet) getHashablePart() []byte { hashable := []byte{p.Raw[0] & 0b00001111} // Lower 4 bits of flags if p.HeaderType == HeaderType2 { - // Match Python: Start hash from DestHash (index 18), skipping TransportID + // Start hash from DestHash (index 18), skipping TransportID dstLen := 16 // RNS.Identity.TRUNCATED_HASHLENGTH / 8 startIndex := dstLen + 2 if len(p.Raw) > startIndex { hashable = append(hashable, p.Raw[startIndex:]...) } } else { - // Match Python: Start hash from DestHash (index 2) + // Start hash from DestHash (index 2) if len(p.Raw) > 2 { hashable = append(hashable, p.Raw[2:]...) }