Пример #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="tagId"></param>
 /// <param name="tlv"></param>
 /// <param name="tagsManager"></param>
 private static void WriteTlv(UInt32 tagId, TlvData tlv, TlvDictionary tagsManager)
 {
     Console.WriteLine("  >> Contains tag {0:X2}: {1} [ {2} ]", tagId, tlv.HasTag(tagId), tlv.GetTag(tagId));
     if (tlv.HasTag(tagId) && (tagsManager.CreateInstance(tlv.GetTag(tagId)) != null))
     {
         Console.ForegroundColor = ConsoleColor.Blue;
         Console.WriteLine("     >> {0:N}: {0}", tagsManager.CreateInstance(tlv.GetTag(tagId)));
         Console.ForegroundColor = ConsoleColor.Gray;
     }
 }
Пример #2
0
 /// <summary>
 /// Initializes a new <see cref="EmvApplication"/> instance.
 /// </summary>
 /// <param name="cardChannel"><see cref="ICardChannel">ICardChannel</see> object to use</param>
 /// <param name="tlvFromPSE"><see cref="TlvData">TLVData</see> object coming from PSE records for this application</param>
 public EmvApplication(ICardChannel cardChannel, TlvData tlvFromPSE)
     : this(cardChannel)
 {
     _tlvFromPSE = tlvFromPSE;
     if (_tlvFromPSE.HasTag(0x4F))
     {
         Aid = _tlvFromPSE.GetTag(0x4F).Value.ToHexa();
     }
 }
Пример #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="tagId"></param>
        /// <param name="tlv"></param>
        /// <param name="tagsManager"></param>
        private void WriteTlv(UInt32 tagId, TlvData tlv, TlvDictionary tagsManager)
        {
            gui.guiDetailedLogs.AppendText(String.Format("  >> TLV {0:X2}: [ {1} ]\n", tagId, tlv.GetTag(tagId)));

            if (!tlv.HasTag(tagId) || (tagsManager.CreateInstance(tlv.GetTag(tagId)) == null))
            {
                return;
            }

            gui.guiDetailedLogs.SelectionColor = highlightColor;
            gui.guiDetailedLogs.AppendText(String.Format("     >> {0:N}: {0}\n", tagsManager.CreateInstance(tlv.GetTag(tagId))));
            gui.guiDetailedLogs.SelectionColor = standardColor;
        }