AndyQ / NFCPassportReader

NFCPassportReader for iOS 13
MIT License
738 stars 239 forks source link

How can I read Data Group 13 field #143

Closed mnive93 closed 2 years ago

mnive93 commented 2 years ago

I have a smart card and I need to read the Data group 13 optional fields. How can I get the raw data from that Datagroup and parse the fields to get necessary information.

AndyQ commented 2 years ago

The data group field should store its data in the body variable as a raw UInt8 byte array. You would then have to parse this out based on whatever the data format is.

Not currently, you'll get back a NotImplementedDG object when reading a DG13 (but it will still have the body data if it could be read). However, there is no strict definition of what it contained or its structure (its left up to the issuing State/Organisation to define that), with the exception of the initial field which is tag 6D (and variable length).