ax(ueps): rename remaining to payloadBytes for semantic clarity
AX Principle 1: names should convey semantic meaning, not implementation perspective. `remaining` describes a buffer operation; `payloadBytes` describes what the data IS — the packet payload content. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
fdc7064e09
commit
df80dbddb5
1 changed files with 2 additions and 2 deletions
|
|
@ -44,11 +44,11 @@ func ReadAndVerify(reader *bufio.Reader, sharedSecret []byte) (*ParsedPacket, er
|
|||
if tagByte == TagPayload {
|
||||
// Payload is length-prefixless; caller frames the stream.
|
||||
// HMAC covers signedData (header TLVs) + raw payload bytes, not the 0xFF tag.
|
||||
remaining, err := io.ReadAll(reader)
|
||||
payloadBytes, err := io.ReadAll(reader)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
payload = remaining
|
||||
payload = payloadBytes
|
||||
break
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue