當前位置: 首頁>>代碼示例>>C#>>正文


C# DerOutputStream.WriteEncoded方法代碼示例

本文整理匯總了C#中Org.BouncyCastle.Asn1.DerOutputStream.WriteEncoded方法的典型用法代碼示例。如果您正苦於以下問題:C# DerOutputStream.WriteEncoded方法的具體用法?C# DerOutputStream.WriteEncoded怎麽用?C# DerOutputStream.WriteEncoded使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Org.BouncyCastle.Asn1.DerOutputStream的用法示例。


在下文中一共展示了DerOutputStream.WriteEncoded方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Encode

        internal override void Encode(
			DerOutputStream derOut)
        {
            if (parsed)
            {
                base.Encode(derOut);
            }
            else
            {
                derOut.WriteEncoded(Asn1Tags.Set | Asn1Tags.Constructed, encoded);
            }
        }
開發者ID:Noyabronok,項目名稱:itextsharpml,代碼行數:12,代碼來源:LazyDERSet.cs

示例2: Encode

 internal override void Encode(
     DerOutputStream derOut)
 {
     if (derOut is Asn1OutputStream || derOut is BerOutputStream)
     {
         derOut.WriteEncoded(Asn1Tags.BitString, (byte)mPadBits, mData);
     }
     else
     {
         base.Encode(derOut);
     }
 }
開發者ID:KimikoMuffin,項目名稱:bc-csharp,代碼行數:12,代碼來源:BERBitString.cs

示例3: Encode

		internal override void Encode(
			DerOutputStream derOut)
		{
			lock (this)
			{
				if (encoded == null)
				{
					base.Encode(derOut);
				}
				else
				{
					derOut.WriteEncoded(Asn1Tags.Sequence | Asn1Tags.Constructed, encoded);
				}
			}
		}
開發者ID:JohnMalmsteen,項目名稱:mobile-apps-tower-defense,代碼行數:15,代碼來源:LazyDERSequence.cs

示例4: Encode

        /*
         * A note on the implementation:
         * <p>
         * As Der requires the constructed, definite-length model to
         * be used for structured types, this varies slightly from the
         * ASN.1 descriptions given. Rather than just outputing Sequence,
         * we also have to specify Constructed, and the objects length.
         */
        internal override void Encode(
            DerOutputStream derOut)
        {
            MemoryStream bOut = new MemoryStream();
            DerOutputStream dOut = new DerOutputStream(bOut);

            foreach (object obj in this)
            {
                dOut.WriteObject(obj);
            }

            dOut.Close();

            byte[] bytes = bOut.ToArray();

            derOut.WriteEncoded(Asn1Tags.Sequence | Asn1Tags.Constructed, bytes);
        }
開發者ID:hjgode,項目名稱:iTextSharpCF,代碼行數:25,代碼來源:DerSequence.cs

示例5: Encode

		/*
		 * A note on the implementation:
		 * <p>
		 * As Der requires the constructed, definite-length model to
		 * be used for structured types, this varies slightly from the
		 * ASN.1 descriptions given. Rather than just outputing Sequence,
		 * we also have to specify Constructed, and the objects length.
		 */
		internal override void Encode(
			DerOutputStream derOut)
		{
			// TODO Intermediate buffer could be avoided if we could calculate expected length
			MemoryStream bOut = new MemoryStream();
			DerOutputStream dOut = new DerOutputStream(bOut);

			foreach (Asn1Encodable obj in this)
			{
				dOut.WriteObject(obj);
			}

			dOut.Dispose();

			byte[] bytes = bOut.ToArray();

			derOut.WriteEncoded(Asn1Tags.Sequence | Asn1Tags.Constructed, bytes);
		}
開發者ID:JohnMalmsteen,項目名稱:mobile-apps-tower-defense,代碼行數:26,代碼來源:DerSequence.cs

示例6: Encode

        /*
         * A note on the implementation:
         * <p>
         * As Der requires the constructed, definite-length model to
         * be used for structured types, this varies slightly from the
         * ASN.1 descriptions given. Rather than just outputing Set,
         * we also have to specify Constructed, and the objects length.
         */
        internal override void Encode(DerOutputStream derOut)
        {
            // TODO Intermediate buffer could be avoided if we could calculate expected length
            using (var bOut = new MemoryStream())
            {
                using (var dOut = new DerOutputStream(bOut))
                {
                    foreach (Asn1Encodable obj in this)
                    {
                        dOut.WriteObject(obj);
                    }
                }

                var bytes = bOut.ToArray();

                derOut.WriteEncoded(Asn1Tags.Set | Asn1Tags.Constructed, bytes);
            }
        }
開發者ID:sanyaade-iot,項目名稱:Schmoose-BouncyCastle,代碼行數:26,代碼來源:DerSet.cs

示例7: Encode

		internal override void Encode(
            DerOutputStream derOut)
        {
            derOut.WriteEncoded(Asn1Tags.UniversalString, this.str);
        }
開發者ID:KimikoMuffin,項目名稱:bc-csharp,代碼行數:5,代碼來源:DerUniversalString.cs

示例8: Encode

        internal override void Encode(
			DerOutputStream derOut)
        {
            derOut.WriteEncoded(Asn1Tags.Application | tag, octets);
        }
開發者ID:hjgode,項目名稱:iTextSharpCF,代碼行數:5,代碼來源:DerApplicationSpecific.cs

示例9: Encode

		internal override void Encode(
			DerOutputStream derOut)
        {
            derOut.WriteEncoded(Asn1Tags.Utf8String, Encoding.UTF8.GetBytes(str));
        }
開發者ID:KimikoMuffin,項目名稱:bc-csharp,代碼行數:5,代碼來源:DerUTF8String.cs

示例10: Encode

        internal override void Encode(
            DerOutputStream derOut)
        {
            byte[] bytes = new byte[GetBytes().Length + 1];

            bytes[0] = (byte) PadBits;
            Array.Copy(GetBytes(), 0, bytes, 1, bytes.Length - 1);

            derOut.WriteEncoded(Asn1Tags.BitString, bytes);
        }
開發者ID:hjgode,項目名稱:iTextSharpCF,代碼行數:10,代碼來源:DerBitString.cs

示例11: Encode

 internal override void Encode(DerOutputStream derOut)
 {
     derOut.WriteEncoded(Asn1Tags.VideotexString, mString);
 }
開發者ID:KimikoMuffin,項目名稱:bc-csharp,代碼行數:4,代碼來源:DerVideotexString.cs

示例12: Encode

 internal override void Encode(
     DerOutputStream derOut)
 {
     derOut.WriteEncoded(Asn1Tags.GeneralizedTime, GetOctets());
 }
開發者ID:karino2,項目名稱:wikipediaconv,代碼行數:5,代碼來源:DerGeneralizedTime.cs

示例13: Encode

 internal override void Encode(
     DerOutputStream derOut)
 {
     derOut.WriteEncoded(Asn1Tags.Integer, bytes);
 }
開發者ID:hjgode,項目名稱:iTextSharpCF,代碼行數:5,代碼來源:DerInteger.cs

示例14: Encode

		internal override void Encode(
            DerOutputStream derOut)
        {
			// TODO Should we make sure the byte value is one of '0' or '0xff' here?
			derOut.WriteEncoded(Asn1Tags.Boolean, new byte[]{ value });
        }
開發者ID:htlp,項目名稱:itextsharp,代碼行數:6,代碼來源:DerBoolean.cs

示例15: Encode

		internal override void Encode(
			DerOutputStream  derOut)
		{
			derOut.WriteEncoded(Asn1Tags.Null, zeroBytes);
		}
開發者ID:htlp,項目名稱:itextsharp,代碼行數:5,代碼來源:DerNull.cs


注:本文中的Org.BouncyCastle.Asn1.DerOutputStream.WriteEncoded方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。