public void Test_DEREncoder() { test1Sequence t1 = new test1Sequence(); BOOLEAN bl1 = new BOOLEAN(); bl1.boolValue = true; NULL nl1 = new NULL(); t1.Components[0] = bl1; t1.Components[1] = nl1; DEREncoder encoder = new DEREncoder(); encoder.Visit(t1); encoder.ShowResult(); }
public void Test_DEREncoder_w_expansion() { e0_BOOLEAN e = new e0_BOOLEAN(); e.boolValue = true; DEREncoder encoder = new DEREncoder(); encoder.Encode(e); TagValueNode n = encoder.ShowResult(); System.IO.MemoryStream memoryStream = new System.IO.MemoryStream(); DERWriter derWriter = new DERWriter(memoryStream); derWriter.Write(n); byte[] derValue = memoryStream.ToArray(); DERPrettyPrinter.Print(derValue); derWriter.Close(); }