当前位置: 首页>>代码示例>>C#>>正文


C# Asn1.DerInteger类代码示例

本文整理汇总了C#中Org.BouncyCastle.Asn1.DerInteger的典型用法代码示例。如果您正苦于以下问题:C# DerInteger类的具体用法?C# DerInteger怎么用?C# DerInteger使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DerInteger类属于Org.BouncyCastle.Asn1命名空间,在下文中一共展示了DerInteger类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CompressedDataParser

		public CompressedDataParser(
			Asn1SequenceParser seq)
		{
			this._version = (DerInteger)seq.ReadObject();
			this._compressionAlgorithm = AlgorithmIdentifier.GetInstance(seq.ReadObject().ToAsn1Object());
			this._encapContentInfo = new ContentInfoParser((Asn1SequenceParser)seq.ReadObject());
		}
开发者ID:ktw,项目名称:OutlookPrivacyPlugin,代码行数:7,代码来源:CompressedDataParser.cs

示例2: EnvelopedData

		public EnvelopedData(
            OriginatorInfo			originatorInfo,
            Asn1Set					recipientInfos,
            EncryptedContentInfo	encryptedContentInfo,
            Asn1Set					unprotectedAttrs)
        {
            if (originatorInfo != null || unprotectedAttrs != null)
            {
                version = new DerInteger(2);
            }
            else
            {
                version = new DerInteger(0);

				foreach (object o in recipientInfos)
				{
                    RecipientInfo ri = RecipientInfo.GetInstance(o);

					if (!ri.Version.Equals(version))
                    {
                        version = new DerInteger(2);
                        break;
                    }
                }
            }

			this.originatorInfo = originatorInfo;
            this.recipientInfos = recipientInfos;
            this.encryptedContentInfo = encryptedContentInfo;
            this.unprotectedAttrs = unprotectedAttrs;
        }
开发者ID:ktw,项目名称:OutlookPrivacyPlugin,代码行数:31,代码来源:EnvelopedData.cs

示例3: CompressedData

		public CompressedData(
            Asn1Sequence seq)
        {
            this.version = (DerInteger) seq[0];
            this.compressionAlgorithm = AlgorithmIdentifier.GetInstance(seq[1]);
            this.encapContentInfo = ContentInfo.GetInstance(seq[2]);
        }
开发者ID:MBrekhof,项目名称:pleiobox-clients,代码行数:7,代码来源:CompressedData.cs

示例4: IssuerAndSerialNumber

 public IssuerAndSerialNumber(
     X509Name	name,
     DerInteger	serialNumber)
 {
     this.name = name;
     this.serialNumber = serialNumber;
 }
开发者ID:ktw,项目名称:OutlookPrivacyPlugin,代码行数:7,代码来源:IssuerAndSerialNumber.cs

示例5: PbeParameter

 public PbeParameter(
     byte[]	salt,
     int		iterationCount)
 {
     this.octStr = new DerOctetString(salt);
     this.iterationCount = new DerInteger(iterationCount);
 }
开发者ID:hjgode,项目名称:iTextSharpCF,代码行数:7,代码来源:PBEParameter.cs

示例6: ElGamalParameter

 public ElGamalParameter(
     IBigInteger	p,
     IBigInteger	g)
 {
     this.p = new DerInteger(p);
     this.g = new DerInteger(g);
 }
开发者ID:sanyaade-iot,项目名称:Schmoose-BouncyCastle,代码行数:7,代码来源:ElGamalParameter.cs

示例7: Cast5CbcParameters

		public Cast5CbcParameters(
            byte[]	iv,
            int		keyLength)
        {
            this.iv = new DerOctetString(iv);
            this.keyLength = new DerInteger(keyLength);
        }
开发者ID:htlp,项目名称:itextsharp,代码行数:7,代码来源:CAST5CBCParameters.cs

示例8: Pkcs12PbeParams

 public Pkcs12PbeParams(
     byte[]	salt,
     int		iterations)
 {
     this.iv = new DerOctetString(salt);
     this.iterations = new DerInteger(iterations);
 }
开发者ID:sanyaade-iot,项目名称:Schmoose-BouncyCastle,代码行数:7,代码来源:PKCS12PBEParams.cs

示例9: DataGroupHash

		public DataGroupHash(
            int				dataGroupNumber,
            Asn1OctetString	dataGroupHashValue)
        {
            this.dataGroupNumber = new DerInteger(dataGroupNumber);
            this.dataGroupHashValue = dataGroupHashValue;
        }
开发者ID:MBrekhof,项目名称:pleiobox-clients,代码行数:7,代码来源:DataGroupHash.cs

示例10: RC2CbcParameter

		public RC2CbcParameter(
            int		parameterVersion,
            byte[]	iv)
        {
            this.version = new DerInteger(parameterVersion);
            this.iv = new DerOctetString(iv);
        }
开发者ID:htlp,项目名称:itextsharp,代码行数:7,代码来源:RC2CBCParameter.cs

示例11: LdsSecurityObject

		private LdsSecurityObject(
			Asn1Sequence seq)
		{
			if (seq == null || seq.Count == 0)
				throw new ArgumentException("null or empty sequence passed.");

			IEnumerator e = seq.GetEnumerator();

			// version
			e.MoveNext();
			version = DerInteger.GetInstance(e.Current);
			// digestAlgorithmIdentifier
			e.MoveNext();
			digestAlgorithmIdentifier = AlgorithmIdentifier.GetInstance(e.Current);

			e.MoveNext();
			Asn1Sequence datagroupHashSeq = Asn1Sequence.GetInstance(e.Current);

			if (version.Value.Equals(BigInteger.One))
			{
				e.MoveNext();
				versionInfo = LdsVersionInfo.GetInstance(e.Current);
			}

			CheckDatagroupHashSeqSize(datagroupHashSeq.Count);

			datagroupHash = new DataGroupHash[datagroupHashSeq.Count];
			for (int i= 0; i< datagroupHashSeq.Count; i++)
			{
				datagroupHash[i] = DataGroupHash.GetInstance(datagroupHashSeq[i]);
			}
		}
开发者ID:MBrekhof,项目名称:pleiobox-clients,代码行数:32,代码来源:LDSSecurityObject.cs

示例12: AttributeCertificateInfo

		private AttributeCertificateInfo(
            Asn1Sequence seq)
        {
			if (seq.Count < 7 || seq.Count > 9)
			{
				throw new ArgumentException("Bad sequence size: " + seq.Count);
			}

			this.version = DerInteger.GetInstance(seq[0]);
            this.holder = Holder.GetInstance(seq[1]);
            this.issuer = AttCertIssuer.GetInstance(seq[2]);
            this.signature = AlgorithmIdentifier.GetInstance(seq[3]);
            this.serialNumber = DerInteger.GetInstance(seq[4]);
            this.attrCertValidityPeriod = AttCertValidityPeriod.GetInstance(seq[5]);
            this.attributes = Asn1Sequence.GetInstance(seq[6]);

			for (int i = 7; i < seq.Count; i++)
            {
                Asn1Encodable obj = (Asn1Encodable) seq[i];

				if (obj is DerBitString)
                {
                    this.issuerUniqueID = DerBitString.GetInstance(seq[i]);
                }
                else if (obj is Asn1Sequence || obj is X509Extensions)
                {
                    this.extensions = X509Extensions.GetInstance(seq[i]);
                }
            }
        }
开发者ID:ktw,项目名称:OutlookPrivacyPlugin,代码行数:30,代码来源:AttributeCertificateInfo.cs

示例13: KeyTransRecipientInfo

		public KeyTransRecipientInfo(
            Asn1Sequence seq)
        {
            this.version = (DerInteger) seq[0];
            this.rid = RecipientIdentifier.GetInstance(seq[1]);
            this.keyEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(seq[2]);
            this.encryptedKey = (Asn1OctetString) seq[3];
        }
开发者ID:htlp,项目名称:itextsharp,代码行数:8,代码来源:KeyTransRecipientInfo.cs

示例14: 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

示例15: PasswordRecipientInfo

		public PasswordRecipientInfo(
            AlgorithmIdentifier	keyEncryptionAlgorithm,
            Asn1OctetString		encryptedKey)
        {
            this.version = new DerInteger(0);
            this.keyEncryptionAlgorithm = keyEncryptionAlgorithm;
            this.encryptedKey = encryptedKey;
        }
开发者ID:htlp,项目名称:itextsharp,代码行数:8,代码来源:PasswordRecipientInfo.cs


注:本文中的Org.BouncyCastle.Asn1.DerInteger类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。