Skip to content

Fix birthdate conversion issue in EFDG11 #40

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AhSem
Copy link

@AhSem AhSem commented Apr 2, 2025

Using Malaysia's passport, parsing the birthdate in EFDG11 is giving error. Upon checking, the value read is in Uint8List with 4 elements, which is a binary coded date.
I am not entirely sure if all MRTD document's birthdates are binary coded, so I apply a length checking on the birthdate value. If it is 4 bytes (length of 4), then it is likely to be binary coded and therefore attempt to convert it accordingly. Otherwise, it will fallback to the original date conversion using String.fromCharCodes

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

Successfully merging this pull request may close these issues.

1 participant