Пример #1
0
		public string GetDescription(ASN1ObjectIdentifier oid) 
		{
			string retString = (hashTable[oid.ToString()] as string);
			if (retString == null) retString=oid.ToString();

			return retString;
		}
Пример #2
0
		public void Test_OBJECT_IDENTIFIER()
		{
			ASN1ObjectIdentifier oid = SimpleSamples.funnyOID;

			BERWriter.DumpHEX(oid);
			Console.WriteLine(oid.ToString());

			ASN1ObjectIdentifier oid1 = new ASN1ObjectIdentifier();

			oid1.Assign(1, 2, 3, 4, 5, 6, 7);
			BERWriter.DumpHEX(oid1);
			Console.WriteLine(oid1.ToString());

			Assert.AreEqual(oid, oid1);

			BEREncoding ber = oid.asDER();
			ASN1ObjectIdentifier_type oid_t = new ASN1ObjectIdentifier_type();

			ASN1ObjectIdentifier oid2 = oid_t.CreateInstance(ber) as ASN1ObjectIdentifier;

			BERWriter.DumpHEX(oid2);





			Console.WriteLine("Unfinished business");
		}