ax(ueps): fix inaccurate default-case comment in ReadAndVerify

Comment showed Write([]byte{...}) but code uses WriteByte — misleading
concrete example violates AX Principle 2 (comments as accurate usage examples).

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 12:31:03 +01:00
parent 836fc18ff3
commit be4d388860
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -84,7 +84,7 @@ func ReadAndVerify(reader *bufio.Reader, sharedSecret []byte) (*ParsedPacket, er
case TagHMAC:
hmacSignature = tagValue
default:
// hmacInputBuffer.Write([]byte{tagType, tagValueLength}); hmacInputBuffer.Write(tagValue) — unknown tags included in HMAC
// hmacInputBuffer.WriteByte(tagType); hmacInputBuffer.WriteByte(tagValueLength); hmacInputBuffer.Write(tagValue)
hmacInputBuffer.WriteByte(tagType)
hmacInputBuffer.WriteByte(tagValueLength)
hmacInputBuffer.Write(tagValue)