AdamLaurie / RFIDIOt

python RFID / NFC library & tools
http://www.rfidiot.org/
1.04k stars 224 forks source link

Changes for Passport card support #31

Closed zoeimogen closed 5 years ago

zoeimogen commented 5 years ago

mrpkey.py doesn't quite work out-of-the box with passport cards, as the MRZ is in a slightly different format from both passport and ID cards. This PR covers that, and follows a stricter interpretation of ICAO Doc 9303 when it comes to Document Types. (Only first character matters, except for IP=Passport Card and AC=AirCrew)

Tested using an EU (Irish) card, but NEXUS, APEC Business Travel Cards and US Passport Cards all appear to follow the same three-line-MRZ format.