-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Glad to see this library! A feature request which I think will make this much more useable for some domains:
ISO 7816-4 Annex D.2 (find it here: https://cardwerk.com/iso7816-4-annex-d-use-of-basic-encoding-rules-asn-1/) specifies an encoding for tags that specify variable lengths for tags, instead of having a single length for all tags. It's a bit obtuse, but it's in common use and it would be nice to have this encoding/decoding support in this library.
Ideally, instead of just setting tag_size to a fixed number, you would also be able to specify an encoding scheme (e.g. 7816, or fixed). An example of a library that enumerates different schemes (both for T encoding and L encoding) is https://www.openscdp.org/scriptingserver/tlv.html (though "EMV" should really be ISO7816/ISO8825)
Dealing with non-open standards is not fun. I'm happy to provide some examples as I can - but you can download EMV book 3 for free which has tons of examples. https://www.emvco.com/wp-content/uploads/documents/EMV_v4.3_Book_3_Application_Specification_20120607062110791.pdf (especially section 7)