Module talktosc::tlvs

source ·
Expand description

This module implements ISO7816 TLV format.

Structs

A TLV contails the tag, and the length and also the value (data). Our implementation also contains a special subs attritbute, which contains a list of composite DOs. Read section 4.4.1 of OpenPGP-smart-card-application-3.4.1.pdf for more details on each tag.

Functions

Utility function to convert any u8 or u16 to hex String
Utility function to convert the TLV.v values into a string of hex.
Returns the serial number of the card from the AID response.
Returns 3 fingerprints as 3 elecment Vec, (signature, decryption, authentication).
This fundtion should be used to parse the data returned by the smartcard to convert them into proper TLV structure.
Reads the given data and creates the TLV structure from the same. Also returns back any extra data still remaining in the input. Used internally in the read_list function.