Exemplo n.º 1
0
//		protected void OPT() 
//		{
//			this.ComponentTypes[typeCounter].isOptional = true;
//		}

		protected void RegType(ASN1Type tip)
		{
			this.ComponentTypes[typeCounter] = ASN1ComponentTypeInfo.Make(tip);
			typeCounter++;
		}
Exemplo n.º 2
0
		protected void RegType(ASN1Type tip, bool optionality)
		{
			this.ComponentTypes[typeCounter] = ASN1ComponentTypeInfo.Make(tip, optionality);
			typeCounter++;
		}
Exemplo n.º 3
0
		/// <summary>
		/// OVO ZELIM BACITI VAN!!! U DRUGU KLASU!!
		/// 
		/// koriste samo Choice i Sequence... to se mora moci lako srediti.
		/// </summary>
		/// <param name="tag"></param>
		/// <param name="tip"></param>
		/// <returns></returns>
		public static bool MatchTag (int tag, ASN1Type tip) 
		{
			if (tip.SkipMatch) 
			{
				return true;
			}
			else if (tip.Tags != null) 
			{
				return (tip.Tags.Contains(tag));
			}
			else return (tag == tip.Tag);
		}
Exemplo n.º 4
0
		protected void RegType(ASN1Type tip, ASN1Object defaultValue)
		{
			this.ComponentTypes[typeCounter] = ASN1ComponentTypeInfo.Make(tip, defaultValue);
			typeCounter++;
		}
		/// <summary>
		/// Koji je UNIQUE?
		/// </summary>
		public void Assign(ASN1ObjectIdentifier _id, ASN1Type _type) 
		{
			this.id   = _id;
			this.type = _type;
			this.uniqueId = this.id;
		}
Exemplo n.º 6
0
		/// <summary>
		/// MUST CHANGE, MOVE OR WHATEVER....
		///    usage - u ASN1Sequence..
		///    
		///    <para>Returns true if ASN1Object ob and ASN1Type tip match.</para>
		/// </summary>
		/// <param name="ob"></param>
		/// <param name="tip"></param>
		/// <returns></returns>
		public static bool MatchType(ASN1Object ob, ASN1Type tip) 
		{
			if ((tip == null)||(ob==null)) 
			{
				/// Ovo je zbog SET OF.
				/// Nadam se da necu platiti penale za ovo. :-(
				return true;
			}
			if (tip.SkipMatch) 
			{
				return true;
			}
			else if (tip.Tags != null) 
			{
				return (tip.Tags.Contains(ob.Tag));
			}
			else return (ob.Tag == tip.Tag);
		}
		public TypeIdentifier(ASN1ObjectIdentifier _id, ASN1Type _type) 
		{
			this.Assign(_id, _type);
		}
		public void Add(ASN1ObjectIdentifier oid, ASN1Type type)
		{
			TypeIdentifier ti = new TypeIdentifier(oid, type);
			this.Add(ti);
		}
Exemplo n.º 9
0
		public virtual void Reg(int tagNum, ASN1Type underType)
		{
			this.Tag = tagNum;
			this.type = underType;
		}
Exemplo n.º 10
0
		public virtual void Reg(int tagNum, ASN1Type belongingType)
		{
			this.Tag = tagNum;
			this.type = belongingType;
		}
Exemplo n.º 11
0
		public ASN1ExplicitTag(ASN1Type type):this() 
		{
			this.type = type;
		}