Example #1
0
 public EFLinearFixed(ushort ID, IISO7816Card owner, DF parent, uint size, byte recordSize)
     : base(ID, owner, parent)
 {
     this.recordSize = recordSize;
     maxRecords      = size / recordSize;
     this.size       = size;
 }
Example #2
0
 public EFCyclic(ushort ID, IISO7816Card owner, DF parent, uint size, byte recordSize)
     : base(ID, owner, parent)
 {
     this.recordSize = recordSize;
     OldestRecord    = 0;
     maxRecords      = size / recordSize;
     this.size       = size;
 }
Example #3
0
 public SecurityEnvironmenet(byte ID, IISO7816Card owner, DF parent)
 {
     id          = ID;
     this.owner  = owner;
     this.parent = parent;
     parent.Childs.Add(this);
     owner.ObjectChanged(this, ChangeType.Created);
     AC = owner.CreateAC(this);
 }
Example #4
0
 public EF(ushort ID, IISO7816Card owner, DF parent)
 {
     id          = ID;
     this.owner  = owner;
     this.parent = parent;
     parent.Childs.Add(this);
     owner.ObjectChanged(this, ChangeType.Created);
     AC = owner.CreateAC(this);
     SM = owner.CreateSM(this);
 }
Example #5
0
 public EF(ushort ID, IISO7816Card owner, DF parent)
 {
     id = ID;
     this.owner = owner;
     this.parent = parent;
     parent.Childs.Add(this);
     owner.ObjectChanged(this, ChangeType.Created);
     AC = owner.CreateAC(this);
     SM = owner.CreateSM(this);
 }
Example #6
0
 public BSO(ushort ID, IISO7816Card owner, DF parent)
 {
     id          = ID;
     this.owner  = owner;
     this.parent = parent;
     Blocked     = false;
     options     = new byte[8];
     parent.Childs.Add(this);
     owner.ObjectChanged(this, ChangeType.Created);
     AC = owner.CreateAC(this);
     SM = owner.CreateSM(this);
 }
Example #7
0
 public EFRecord(ushort ID, IISO7816Card owner, DF parent)
     : base(ID, owner, parent)
 {
     data = new List <byte[]>();
 }
 void TreeAdd(DF df)
 {
     foreach (var v in df.Childs)
     {
         card_objectChanged(v.Owner, v, ChangeType.Created);
         if (v is DF)
             TreeAdd(v as DF);
     }
 }
Example #9
0
 public SecurityEnvironmenet(byte ID, IISO7816Card owner, DF parent)
 {
     id = ID;
     this.owner = owner;
     this.parent = parent;
     parent.Childs.Add(this);
     owner.ObjectChanged(this, ChangeType.Created);
     AC = owner.CreateAC(this);
 }
Example #10
0
 public EFBinary(ushort ID, IISO7816Card owner, DF parent, uint size)
     : base(ID, owner, parent)
 {
     data = new byte[size];
 }
        public CardSelectable GetSelectablePath(DF startPath, byte[] path, int offset)
        {
            if (offset == path.Length - 2) {
                var term=startPath.GetChildEForDF(Util.ToUShort(path, path.Length - 2));
                return term;
            }
            var childDF=startPath.GetChildDF(Util.ToUShort(path,offset));
            if (childDF == null)
                return null;
            return GetSelectablePath(childDF, path, offset + 2);

        }
Example #12
0
 public EFBinary(ushort ID, IISO7816Card owner, DF parent,uint size)
     : base(ID, owner, parent)
 {
     data = new byte[size];
 }
Example #13
0
 public EFLinearTLV(ushort ID, IISO7816Card owner, DF parent, uint size)
     : base(ID, owner, parent) {
         this.size = size;
 }
Example #14
0
 public EFLinearFixed(ushort ID, IISO7816Card owner, DF parent, uint size, byte recordSize)
     : base(ID, owner, parent) {
         this.recordSize = recordSize;
         maxRecords = size / recordSize;
         this.size = size;
     }
Example #15
0
 public EFCyclic(ushort ID, IISO7816Card owner, DF parent, uint size, byte recordSize)
     : base(ID, owner, parent)
 {
     this.recordSize = recordSize;
     OldestRecord = 0;
     maxRecords = size / recordSize;
     this.size = size;
 }
Example #16
0
 public EFLinearTLV(ushort ID, IISO7816Card owner, DF parent, uint size)
     : base(ID, owner, parent)
 {
     this.size = size;
 }
 public DF GetNamedDF(DF root, byte[] AID)
 {
     if (Util.CompareByteArray(root.AID, AID))
         return root;
     foreach (var v in root.Childs)
     {
         if (v is DF)
         {
             DF namedDF = GetNamedDF(v as DF, AID);
             if (namedDF != null)
                 return namedDF;
         }
     }
     return null;
 }
 bool IsInScope(DF scope,BSO obj) {
     if (scope == obj.Parent) return true;
     if (scope.Parent == null)
         return false;
     return IsInScope(scope.Parent, obj);
 }
Example #19
0
 public EFRecord(ushort ID, IISO7816Card owner, DF parent)
     : base(ID, owner, parent)
 {
     data = new List<byte[]>();
 }