AndyQ / NFCPassportReader

NFCPassportReader for iOS 13
MIT License
754 stars 245 forks source link

Realiable personalNumber fetching #144

Closed TerjeLon closed 2 years ago

TerjeLon commented 2 years ago

Currently personalNumber is fetched from DG1, which contains MRZ information.

According to the ICAO implementation the actual personalNumber resides in DG11 (see https://www.icao.int/publications/documents/9303_p10_cons_en.pdf)

It appears that some passports does not contain DG11, so i left the original fetch from DG1 there for reliability.

Note: DG1 personalNumber does not appear the same as in the actual passports, even though the implementation is correct. Eg. my personalNumber contains 9 digits, while DG1 returns 14 digits. DG11 on the other hand provides it correctly.