[][src]Module talktosc::tlvs

This module implements ISO7816 TLV format.

Structs

TLV

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

hex

Utility function to convert any u8 or u16 to hex String

hexify

Utility function to convert the TLV.v values into a string of hex.

parse_card_serial

Returns the serial number of the card from the AID response.

parse_fingerprints

Returns 3 fingerprints as 3 elecment Vec, (signature, decryption, authentication).

read_list

This fundtion should be used to parse the data returned by the smartcard to convert them into proper TLV structure.

read_single

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.