當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。