private static void CreateEntry(EMVTagMeta emvTagMeta, byte[] value) { TLV tlv = TLV.Create(emvTagMeta.Tag); tlv.Value = value; EMVTagDefaultsList.AddToList(tlv); }
public SmartTag(EMVTagMeta emvTagMeta, V value) : base() { EMVTagMeta = emvTagMeta; Tag = new T(EMVTagMeta.Tag); Val = value; }
private static void AddDDEntry(EMVTagMeta tag, KernelDatabaseBase database) { if (database.IsPresent(tag.Tag)) { database.Get(EMVTagsEnum.DISCRETIONARY_DATA_FF8106_KRN2).Children.AddToList(TLV.Create(tag.Tag, database.Get(tag).Value)); } }
public static void PackRelatedDataTag(KernelDatabaseBase database, EMVTagMeta tagToPack, TLVList tagListForPack) { TLV tlvRelatedData = database.Get(tagToPack); List <byte[]> tlvRelatedDataBytes = new List <byte[]>(); Logger.Log("Packing tag: " + tagListForPack.ToString()); foreach (TLV tlv in tagListForPack) { TLV valForPackDb = database.Get(tlv.Tag.TagLable); TLV valForPack; if (valForPackDb == null) { valForPack = TLV.Create(tlv.Tag.TagLable); } else { byte[] copyVal = new byte[valForPackDb.Value.Length]; Array.Copy(valForPackDb.Value, copyVal, valForPackDb.Value.Length); valForPack = TLV.Create(tlv.Tag.TagLable, copyVal); } valForPack.Val.PackValue(tlv.Val.GetLength()); Logger.Log("Adding tag: " + valForPack.ToString()); tlvRelatedDataBytes.Add(valForPack.Value); } tlvRelatedData.Value = tlvRelatedDataBytes.SelectMany(a => a).ToArray(); }
public TLV GetDefault(EMVTagMeta tag) { return(Get(tag)); //TLV result = Kernel2ConfigurationData.Get(tag.Tag, TransactionRequest.GetTransactionType_9C()); //if (result == null) // return null; //else // return result; }
public TLV Get(EMVTagMeta tag) { TLV result = DataObjects.Get(tag.Tag); if (result == null) { return(null); } else { return(result); } }
public SmartTag(TLV tlv, EMVTagMeta emvTagMeta, V value) : base() { EMVTagMeta = emvTagMeta; Tag = new T(EMVTagMeta.Tag); Val = value; if (tlv != null && tlv.Val.Value.Length > 0) { Val.Deserialize(tlv.Val.Serialize(), 0); } }
public SmartTag(KernelDatabaseBase database, EMVTagMeta emvTagMeta, V value) : base() { this.database = database; EMVTagMeta = emvTagMeta; Tag = new T(EMVTagMeta.Tag); Val = value; TLV tlv = database.Get(EMVTagMeta); if (tlv != null && tlv.Val.Value.Length > 0) { Val.Deserialize(tlv.Val.Serialize(), 0); } }
public void AddTag(EMVTagMeta tag) { Tags.Add(tag.Tag); }
protected void AddDefaultTLV(TLVList list, EMVTagMeta tag, string hexValue) { list.AddToList(TLV.Create(tag.Tag, Formatting.HexStringToByteArray(hexValue))); }