Mining/pkg/ueps
Claude 89e70a4449
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
ax(ueps): eliminate duplicated HMAC buffer writes in ReadAndVerify switch
The switch in ReadAndVerify duplicated the same three hmacInputBuffer.WriteByte/Write
calls across five cases plus default. Extracted to a single conditional after the switch:
all tags except TagHMAC feed the authenticated input buffer. Behaviour is identical;
declarative intent is now clear (AX principle 5 — declarative over imperative).

Co-Authored-By: Charon <charon@lethean.io>
2026-04-02 14:15:06 +01:00
..
packet.go ax(ueps): expand MarshalAndSign comment to full usage example with error handling 2026-04-02 13:45:50 +01:00
packet_test.go ax(ueps): name magic secret literals in NewPacketBuilder tests 2026-04-02 14:12:18 +01:00
reader.go ax(ueps): eliminate duplicated HMAC buffer writes in ReadAndVerify switch 2026-04-02 14:15:06 +01:00
reader_test.go ax(ueps): rename reader to frameReader in ReadAndVerify tests 2026-04-02 14:09:28 +01:00