private static void WriteToGenerator(
				Asn1Generator	ag,
				Asn1Encodable	ae)
			{
				byte[] encoded = ae.GetEncoded();
				ag.GetRawOutputStream().Write(encoded, 0, encoded.Length);
			}
Ejemplo n.º 2
0
        private static void WriteSetToGeneratorTagged(
			Asn1Generator		asn1Gen,
			Asn1SetParser		asn1SetParser,
			int					tagNo)
        {
            Asn1Set asn1Set = GetAsn1Set(asn1SetParser);

            if (asn1Set != null)
            {
                Asn1TaggedObject taggedObj = (asn1SetParser is BerSetParser)
                    ?	new BerTaggedObject(false, tagNo, asn1Set)
                    :	new DerTaggedObject(false, tagNo, asn1Set);

                WriteToGenerator(asn1Gen, taggedObj);
            }
        }