Example #1
0
        public static Atr Parse(byte[] data)
        {
            BinaryParser parser = new BinaryParser(data);

            // Perform a quick sanity check on the ATR, see ISO-7816-3 definition of 'TS' character.
            if (data[0] != 0x3F && data[0] != 0x3B)
            {
                throw new ProtocolException(@"Invalid ATR according to ISO 7816-3");
            }

            Atr atr = new Atr(data);

            return(atr);
        }
Example #2
0
 public override string ToString()
 {
     return(@"ISO 7816 Part-4 Protocol (ATR: " + Atr.ToString() + ")");
 }