Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few errors in the Example 11 #13

Closed
timothee-haudebourg opened this issue Jul 23, 2024 · 2 comments
Closed

A few errors in the Example 11 #13

timothee-haudebourg opened this issue Jul 23, 2024 · 2 comments

Comments

@timothee-haudebourg
Copy link

I've spotted what I believe to be a few errors in the PDF-417 payload showed in Example 11.

  1. There is a missing trailing space in the file type (should be ANSI ), as mentioned in Minor issues with test vectors and examples #12
  2. The DL subfile length seems wrong: it is set to 0267 where I find a value of 0234.
  3. The ZZ offset is wrong (probably because of 2.): it is set to 0308 (41 + 267) where I find a value of 0275 (41 + 275)
  4. The ZZ subfile lenght seems wrong: 0162 instead of 0202. This one can be easily decomposed as 202 = 2 (ZZ) + 3 + (ZZA) + 196 (base64-encoded CBOR-LD VC) + 1 (segment terminator)

Here is what I think is the correct payload:

@\n\x1e\rANSI 000000090002DL00410234ZZ02750202DLDAQF987654321\nDCSSMITH\nDDEN\nDACJOHN\nDDFN\nDADNONE\nDDGN\nDCAC\nDCBNONE\nDCDNONE\nDBD01012024\nDBB04191988\nDBA04192030\nDBC1\nDAU069 IN\nDAYBRO\nDAG123 MAIN ST\nDAIANYVILLE\nDAJUTO\nDAKF87P20000  \nDCFUTODOCDISCRIM\nDCGUTO\nDAW158\nDCK1234567890\nDDAN\rZZZZA2QZkpgGDGYAAGYABGYACGJ2CGHYYpBi4oxicGKYYzhiyGNAa5ZIggRi6ohicGKAYqER1ggAgGL4YqhjApRicGGwY1gQY4BjmGOJYQXq3wuVrSeLM5iGEziaBjhWosXMWRAG107uT_9bSteuPasCXFQKuPdSdF-xmUoFkA0yRJoW4ERvATNyewT263ZHMGOQYrA==\r

However it is possible I misunderstood something in AAMVA's PDF-417 data encoding.

@wes-smith
Copy link
Collaborator

@timothee-haudebourg
Thanks for the thorough analysis! Updated barcodes with the correct header information will be in shortly.

@msporny
Copy link
Contributor

msporny commented Jul 23, 2024

PR #14 has been merged, closing.

@msporny msporny closed this as completed Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants