/// <summary>
        /// Detects the ICC type by parsing, and analyzing the ATR
        /// </summary>
        /// <returns>
        /// none
        /// </returns>
        public void DetectCardType()
        {
            ReaderStatus status = cardReader.GetStatus();

            Atr = status.GetAtr();

            Debug.WriteLine("Status: " + status.State.ToString() + " ATR [" + Atr.Length + "] = " + BitConverter.ToString(Atr));

            AtrInformation = AtrParser.Parse(Atr);

            if (AtrInformation != null && AtrInformation.HistoricalBytes.Length > 0)
            {
                DetectCard();
            }
        }
Beispiel #2
0
 public void Should_the_ATR_be_01_02_03_04()
 {
     _readerStatus.GetAtr().Should().ContainInOrder(new byte[] { 0x1, 0x2, 0x3, 0x4 });
 }