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:
parent
51595300a2
commit
8d9606c2d8
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue