当前位置: 首页>>代码示例>>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;未经允许,请勿转载。