[codex] Fix transit card balance readers#10
Merged
Conversation
Compute T-Union balance as primary minus negative purse and add robust file-info parsing and metadata. Added file15SFIReadP1 constant and a READ BINARY-by-SFI fallback (p1=0x95) when SELECT 0015 fails; introduced parseFileInfo and readFileInfoFromSFI helpers and record file-info source. TransitBalance now carries reader-specific metadata. Updated display logic to always use primary - negative, and updated TUnionReader to include metadata about balance sources and file info. Tests expanded/added for T-Union, JapanIC and Octopus (with logged-transport helpers and hex utilities). Documentation updated with Shanghai app findings and the new SFI fallback and purse-delta behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Validation
Notes
Classic EasyCard remains a decrypted-dump parsing target on iOS. The new TWD formatting and documented layout prepare the parser work without adding a live MIFARE Classic authentication path.