ax(ueps): rename expectedMAC to expectedMessageAuthCode
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

MAC is an abbreviation requiring context; expectedMessageAuthCode matches
the established messageAuthCode pattern and is self-describing (AX §1).

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 09:23:29 +01:00
parent 865a690853
commit db124cff82
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -112,9 +112,9 @@ func ReadAndVerify(reader *bufio.Reader, sharedSecret []byte) (*ParsedPacket, er
messageAuthCode := hmac.New(sha256.New, sharedSecret)
messageAuthCode.Write(signedData.Bytes())
messageAuthCode.Write(payload)
expectedMAC := messageAuthCode.Sum(nil)
expectedMessageAuthCode := messageAuthCode.Sum(nil)
if !hmac.Equal(signature, expectedMAC) {
if !hmac.Equal(signature, expectedMessageAuthCode) {
return nil, errIntegrityViolation
}