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


C# Asn1.Asn1Object類代碼示例

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


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

示例1: EncryptionScheme

        internal EncryptionScheme(
			Asn1Sequence seq)
            : base(seq)
        {
            objectID = (Asn1Object) seq[0];
            obj = (Asn1Object) seq[1];
        }
開發者ID:Noyabronok,項目名稱:itextsharpml,代碼行數:7,代碼來源:EncryptionScheme.cs

示例2: SafeBag

		public SafeBag(
            DerObjectIdentifier	oid,
            Asn1Object			obj)
        {
            this.bagID = oid;
            this.bagValue = obj;
            this.bagAttributes = null;
        }
開發者ID:ktw,項目名稱:OutlookPrivacyPlugin,代碼行數:8,代碼來源:SafeBag.cs

示例3: DerExternal

		/**
		* Creates a new instance of DerExternal.
		* See X.690 for more informations about the meaning of these parameters
		* @param directReference The direct reference or <code>null</code> if not set.
		* @param indirectReference The indirect reference or <code>null</code> if not set.
		* @param dataValueDescriptor The data value descriptor or <code>null</code> if not set.
		* @param encoding The encoding to be used for the external data
		* @param externalData The external data
		*/
		public DerExternal(DerObjectIdentifier directReference, DerInteger indirectReference, Asn1Object dataValueDescriptor, int encoding, Asn1Object externalData)
		{
			DirectReference = directReference;
			IndirectReference = indirectReference;
			DataValueDescriptor = dataValueDescriptor;
			Encoding = encoding;
			ExternalContent = externalData.ToAsn1Object();
		}
開發者ID:KimikoMuffin,項目名稱:bc-csharp,代碼行數:17,代碼來源:DERExternal.cs

示例4: IsConstructed

 internal static bool IsConstructed(bool isExplicit, Asn1Object obj)
 {
     if (isExplicit || obj is Asn1Sequence || obj is Asn1Set)
         return true;
     Asn1TaggedObject tagged = obj as Asn1TaggedObject;
     if (tagged == null)
         return false;
     return IsConstructed(tagged.IsExplicit(), tagged.GetObject());
 }
開發者ID:KimikoMuffin,項目名稱:bc-csharp,代碼行數:9,代碼來源:Asn1TaggedObject.cs

示例5: Asn1Equals

		protected override bool Asn1Equals(
			Asn1Object asn1Object)
        {
			DerGeneralString other = asn1Object as DerGeneralString;

			if (other == null)
				return false;

			return this.str.Equals(other.str);
        }
開發者ID:nicecai,項目名稱:iTextSharp-4.1.6,代碼行數:10,代碼來源:DerGeneralString.cs

示例6: SmimeCapability

		public SmimeCapability(
            Asn1Sequence seq)
        {
            capabilityID = (DerObjectIdentifier) seq[0].ToAsn1Object();

			if (seq.Count > 1)
            {
                parameters = seq[1].ToAsn1Object();
            }
        }
開發者ID:MBrekhof,項目名稱:pleiobox-clients,代碼行數:10,代碼來源:SMIMECapability.cs

示例7: ServiceLocator

		private ServiceLocator(
			Asn1Sequence seq)
		{
			this.issuer = X509Name.GetInstance(seq[0]);

			if (seq.Count > 1)
			{
				this.locator = seq[1].ToAsn1Object();
			}
		}
開發者ID:MBrekhof,項目名稱:pleiobox-clients,代碼行數:10,代碼來源:ServiceLocator.cs

示例8: Asn1Equals

		protected override bool Asn1Equals(
			Asn1Object asn1Object)
        {
			DerEnumerated other = asn1Object as DerEnumerated;

			if (other == null)
				return false;

			return Arrays.AreEqual(this.bytes, other.bytes);
        }
開發者ID:ktw,項目名稱:OutlookPrivacyPlugin,代碼行數:10,代碼來源:DerEnumerated.cs

示例9: Time

		public Time(
            Asn1Object time)
        {
            if (!(time is DerUtcTime)
                && !(time is DerGeneralizedTime))
            {
                throw new ArgumentException("unknown object passed to Time");
            }

			this.time = time;
        }
開發者ID:pusp,項目名稱:o2platform,代碼行數:11,代碼來源:Time.cs

示例10: Asn1Equals

        protected override bool Asn1Equals(
			Asn1Object asn1Object)
        {
            DerApplicationSpecific other = asn1Object as DerApplicationSpecific;

            if (other == null)
                return false;

            return this.tag == other.tag
                && Arrays.AreEqual(this.octets, other.octets);
        }
開發者ID:hjgode,項目名稱:iTextSharpCF,代碼行數:11,代碼來源:DerApplicationSpecific.cs

示例11: Asn1Equals

        protected override bool Asn1Equals(
			Asn1Object asn1Object)
        {
            DerUnknownTag other = asn1Object as DerUnknownTag;

            if (other == null)
                return false;

            return this.tag == other.tag
                && Arrays.AreEqual(this.data, other.data);
        }
開發者ID:hjgode,項目名稱:iTextSharpCF,代碼行數:11,代碼來源:DerUnknownTag.cs

示例12: Asn1Equals

		protected override bool Asn1Equals(
			Asn1Object asn1Object)
        {
			Asn1TaggedObject other = asn1Object as Asn1TaggedObject;

			if (other == null)
				return false;

			return this.tagNo == other.tagNo
//				&& this.empty == other.empty
				&& this.explicitly == other.explicitly   // TODO Should this be part of equality?
				&& Platform.Equals(GetObject(), other.GetObject());
		}
開發者ID:ktw,項目名稱:OutlookPrivacyPlugin,代碼行數:13,代碼來源:Asn1TaggedObject.cs

示例13: CommitmentTypeQualifier

    /**
        * Creates a new <code>CommitmentTypeQualifier</code> instance.
        *
        * @param commitmentTypeIdentifier a <code>CommitmentTypeIdentifier</code> value
        * @param qualifier the qualifier, defined by the above field.
        */
        public CommitmentTypeQualifier(
            DerObjectIdentifier	commitmentTypeIdentifier,
            Asn1Encodable		qualifier)
        {
			if (commitmentTypeIdentifier == null)
				throw new ArgumentNullException("commitmentTypeIdentifier");

			this.commitmentTypeIdentifier = commitmentTypeIdentifier;

			if (qualifier != null)
			{
				this.qualifier = qualifier.ToAsn1Object();
			}
        }
開發者ID:MBrekhof,項目名稱:pleiobox-clients,代碼行數:20,代碼來源:CommitmentTypeQualifier.cs

示例14: DerExternal

		public DerExternal(
			Asn1EncodableVector vector)
		{
			int offset = 0;
			Asn1Object enc = GetObjFromVector(vector, offset);
			if (enc is DerObjectIdentifier)
			{
				directReference = (DerObjectIdentifier)enc;
				offset++;
				enc = GetObjFromVector(vector, offset);
			}
			if (enc is DerInteger)
			{
				indirectReference = (DerInteger) enc;
				offset++;
				enc = GetObjFromVector(vector, offset);
			}
			if (!(enc is DerTaggedObject))
			{
				dataValueDescriptor = (Asn1Object) enc;
				offset++;
				enc = GetObjFromVector(vector, offset);
			}
			if (!(enc is DerTaggedObject))
			{
				throw new InvalidOperationException(
					"No tagged object found in vector. Structure doesn't seem to be of type External");
			}

			if (vector.Count != offset + 1)
				throw new ArgumentException("input vector too large", "vector");

			if (!(enc is DerTaggedObject))
				throw new ArgumentException("No tagged object found in vector. Structure doesn't seem to be of type External", "vector");

			DerTaggedObject obj = (DerTaggedObject)enc;

			// Use property accessor to include check on value
			Encoding = obj.TagNo;

			if (encoding < 0 || encoding > 2)
				throw new InvalidOperationException("invalid encoding value");

			externalContent = obj.GetObject();
		}
開發者ID:MBrekhof,項目名稱:pleiobox-clients,代碼行數:45,代碼來源:DERExternal.cs

示例15: SignerIdentifier

		public SignerIdentifier(
            Asn1Object id)
        {
            this.id = id;
        }
開發者ID:ktw,項目名稱:OutlookPrivacyPlugin,代碼行數:5,代碼來源:SignerIdentifier.cs


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