ax(ueps): replace prose comment with usage example in ReadAndVerify default case

Per AX Principle 2, comments must show concrete usage, not describe intent.
The `default:` branch comment now demonstrates the write calls rather than
explaining what they protect against.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 11:03:35 +01:00
parent 51595300a2
commit 8d9606c2d8
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -85,7 +85,7 @@ func ReadAndVerify(reader *bufio.Reader, sharedSecret []byte) (*ParsedPacket, er
case TagHMAC:
hmacSignature = tagValue
default:
// unknown tags contribute to HMAC coverage, blocking tag-injection attacks
// signedData.Write([]byte{tagType, tagValueLength}); signedData.Write(tagValue) — unknown tags included in HMAC
signedData.WriteByte(tagType)
signedData.WriteByte(tagValueLength)
signedData.Write(tagValue)