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


C# CmsAttributeTableGenerator类代码示例

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


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

示例1: SignerInfoGenerator

 internal SignerInfoGenerator(SignerIdentifier sigId, ISignatureCalculator contentSigner, CmsAttributeTableGenerator signedGen, CmsAttributeTableGenerator unsignedGen)
 {
     this.sigId = sigId;
     this.contentSigner = contentSigner;
     this.signedGen = signedGen;
     this.unsignedGen = unsignedGen;
     this.isDirectSignature = false;
 }
开发者ID:martijn00,项目名称:BouncyCastle-PCL,代码行数:8,代码来源:SignerInfoGenerator.cs

示例2: SignerInf

 internal SignerInf(
     CmsSignedGenerator outer,
     ISignatureFactory sigCalc,
     SignerIdentifier signerIdentifier,
     CmsAttributeTableGenerator sAttr,
     CmsAttributeTableGenerator unsAttr,
     Asn1.Cms.AttributeTable baseSignedTable)
 {
     this.outer = outer;
     this.sigCalc = sigCalc;
     this.signerIdentifier = signerIdentifier;
     this.digestOID = new DefaultDigestAlgorithmIdentifierFinder().find((AlgorithmIdentifier)sigCalc.AlgorithmDetails).Algorithm.Id;
     this.encOID = ((AlgorithmIdentifier)sigCalc.AlgorithmDetails).Algorithm.Id;
     this.sAttr = sAttr;
     this.unsAttr = unsAttr;
     this.baseSignedTable = baseSignedTable;
 }
开发者ID:KimikoMuffin,项目名称:bc-csharp,代码行数:17,代码来源:CMSSignedDataGenerator.cs

示例3: SignerInf

			internal SignerInf(
                CmsSignedGenerator			outer,
	            AsymmetricKeyParameter		key,
	            SignerIdentifier			signerIdentifier,
	            string						digestOID,
	            string						encOID,
	            CmsAttributeTableGenerator	sAttr,
	            CmsAttributeTableGenerator	unsAttr,
	            Asn1.Cms.AttributeTable		baseSignedTable)
	        {
                this.outer = outer;
                this.key = key;
                this.signerIdentifier = signerIdentifier;
                this.digestOID = digestOID;
                this.encOID = encOID;
	            this.sAttr = sAttr;
	            this.unsAttr = unsAttr;
	            this.baseSignedTable = baseSignedTable;
            }
开发者ID:ALange,项目名称:OutlookPrivacyPlugin,代码行数:19,代码来源:CMSSignedDataGenerator.cs

示例4: SignerInf

            internal SignerInf(
				CmsSignedDataStreamGenerator	outer,
				AsymmetricKeyParameter			key,
				X509Certificate					cert,
				string							digestOID,
				string							encOID,
				CmsAttributeTableGenerator		sAttr,
				CmsAttributeTableGenerator		unsAttr,
				ISigner							signature)
			{
				this.outer = outer;

				_key = key;
				_cert = cert;
				_digestOID = digestOID;
				_encOID = encOID;
				_sAttr = sAttr;
				_unsAttr = unsAttr;
				_signature = signature;
			}
开发者ID:nicecai,项目名称:iTextSharp-4.1.6,代码行数:20,代码来源:CMSSignedDataStreamGenerator.cs

示例5: AddSigner

		/**
		 * add a signer, specifying the digest encryption algorithm, with extra signed/unsigned attributes based on generators.
		 */
		public void AddSigner(
			AsymmetricKeyParameter		privateKey,
			X509Certificate				cert,
			string						encryptionOID,
			string						digestOID,
			CmsAttributeTableGenerator	signedAttrGen,
			CmsAttributeTableGenerator	unsignedAttrGen)
		{
			doAddSigner(privateKey, GetSignerIdentifier(cert), encryptionOID, digestOID, signedAttrGen,
				unsignedAttrGen, null);
		}
开发者ID:ALange,项目名称:OutlookPrivacyPlugin,代码行数:14,代码来源:CMSSignedDataGenerator.cs

示例6: AddSigner

		public void AddSigner(
			AsymmetricKeyParameter		privateKey,
			byte[]						subjectKeyID,
			string						digestOid,
			CmsAttributeTableGenerator	signedAttrGenerator,
			CmsAttributeTableGenerator	unsignedAttrGenerator)
		{
			ConfigureDigest(digestOid);

            string digestName = Helper.GetDigestAlgName(digestOid);
            string encOID = GetEncOid(privateKey, digestOid);
            string signatureName = digestName + "with" + Helper.GetEncryptionAlgName(encOID);
            ISigner sig = Helper.GetSignatureInstance(signatureName);
            sig.Init(true, new ParametersWithRandom(privateKey, rand));

			_signerInfs.Add(new SignerInf(this, privateKey, subjectKeyID, digestOid, encOID,
				signedAttrGenerator, unsignedAttrGenerator, sig));
		}
开发者ID:nicecai,项目名称:iTextSharp-4.1.6,代码行数:18,代码来源:CMSSignedDataStreamGenerator.cs

示例7: AddSigner

 public void AddSigner(
     IAsymmetricKeyParameter privateKey,
     byte[] subjectKeyID,
     string encryptionOid,
     string digestOid,
     CmsAttributeTableGenerator signedAttrGenerator,
     CmsAttributeTableGenerator unsignedAttrGenerator)
 {
     DoAddSigner(privateKey, GetSignerIdentifier(subjectKeyID), encryptionOid, digestOid,
         signedAttrGenerator, unsignedAttrGenerator);
 }
开发者ID:sanyaade-iot,项目名称:Schmoose-BouncyCastle,代码行数:11,代码来源:CMSSignedDataStreamGenerator.cs

示例8: doAddSigner

		private void doAddSigner(
			AsymmetricKeyParameter		privateKey,
			SignerIdentifier            signerIdentifier,
			string                      encryptionOID,
			string                      digestOID,
			CmsAttributeTableGenerator  signedAttrGen,
			CmsAttributeTableGenerator  unsignedAttrGen,
			Asn1.Cms.AttributeTable		baseSignedTable)
		{
			signerInfs.Add(new SignerInf(this, privateKey, signerIdentifier, digestOID, encryptionOID,
				signedAttrGen, unsignedAttrGen, baseSignedTable));
		}
开发者ID:ALange,项目名称:OutlookPrivacyPlugin,代码行数:12,代码来源:CMSSignedDataGenerator.cs

示例9: WithSignedAttributeGenerator

        /**
         *  Provide a custom signed attribute generator.
         *
         * @param signedGen a generator of signed attributes.
         * @return the builder object
         */
        public SignerInfoGeneratorBuilder WithSignedAttributeGenerator(CmsAttributeTableGenerator signedGen)
        {
            this.signedGen = signedGen;

            return this;
        }
开发者ID:martijn00,项目名称:BouncyCastle-PCL,代码行数:12,代码来源:SignerInfoGenerator.cs

示例10: SignerInf

 internal SignerInf(CmsSignedGenerator outer, AsymmetricKeyParameter key, SignerIdentifier signerIdentifier, string digestOID, string encOID,
     CmsAttributeTableGenerator sAttr, CmsAttributeTableGenerator unsAttr, Asn1.Cms.AttributeTable baseSignedTable)
 {
     _outer = outer;
     _key = key;
     _signerIdentifier = signerIdentifier;
     _digestOID = digestOID;
     _encOID = encOID;
     _sAttr = sAttr;
     _unsAttr = unsAttr;
     _baseSignedTable = baseSignedTable;
 }
开发者ID:Xanagandr,项目名称:DisaOpenSource,代码行数:12,代码来源:CMSSignedDataGenerator.cs

示例11: AddSigner

		/**
		 * add a signer with extra signed/unsigned attributes based on generators.
		 */
		public void AddSigner(
			AsymmetricKeyParameter		privateKey,
			X509Certificate				cert,
			string						digestOID,
			CmsAttributeTableGenerator	signedAttrGen,
			CmsAttributeTableGenerator	unsignedAttrGen)
		{
			string encOID = GetEncOid(privateKey, digestOID);

			signerInfs.Add(new SignerInf(this, privateKey, cert, digestOID, encOID,
				signedAttrGen, unsignedAttrGen, null));
		}
开发者ID:pusp,项目名称:o2platform,代码行数:15,代码来源:CMSSignedDataGenerator.cs

示例12: AddSigner

		public void AddSigner(
			AsymmetricKeyParameter		privateKey,
			byte[]						subjectKeyID,
			string						digestOid,
			CmsAttributeTableGenerator	signedAttrGenerator,
			CmsAttributeTableGenerator	unsignedAttrGenerator)
		{
			AddSigner(privateKey, subjectKeyID, Helper.GetEncOid(privateKey, digestOid),
				digestOid, signedAttrGenerator, unsignedAttrGenerator);
		}
开发者ID:kbettadapur,项目名称:MusicPlayer,代码行数:10,代码来源:CMSSignedDataStreamGenerator.cs

示例13: AddSigner

        public void AddSigner(
			AsymmetricKeyParameter		privateKey,
			X509Certificate				cert,
			string						digestOID,
			CmsAttributeTableGenerator  signedAttrGenerator,
			CmsAttributeTableGenerator  unsignedAttrGenerator)
        {
            string encOID = GetEncOid(privateKey, digestOID);
            string digestName = Helper.GetDigestAlgName(digestOID);
            string signatureName = digestName + "with" + Helper.GetEncryptionAlgName(encOID);
            ISigner sig = Helper.GetSignatureInstance(signatureName);
            IDigest dig = Helper.GetDigestInstance(digestName);

            sig.Init(true, privateKey);

            _signerInfs.Add(new SignerInf(this, privateKey, cert, digestOID, encOID,
                signedAttrGenerator, unsignedAttrGenerator, dig, sig));
            _messageDigests.Add(dig);
        }
开发者ID:hjgode,项目名称:iTextSharpCF,代码行数:19,代码来源:CMSSignedDataStreamGenerator.cs

示例14: DoAddSigner

        private void DoAddSigner(
            AsymmetricKeyParameter		privateKey,
            SignerIdentifier			signerIdentifier,
            string						encryptionOid,
            string						digestOid,
            CmsAttributeTableGenerator	signedAttrGenerator,
            CmsAttributeTableGenerator	unsignedAttrGenerator)
        {
            ConfigureDigest(digestOid);

            SignerInfoGeneratorImpl signerInf = new SignerInfoGeneratorImpl(this, privateKey,
                signerIdentifier, digestOid, encryptionOid, signedAttrGenerator, unsignedAttrGenerator);

            _signerInfs.Add(new DigestAndSignerInfoGeneratorHolder(signerInf, digestOid));
        }
开发者ID:karino2,项目名称:wikipediaconv,代码行数:15,代码来源:CMSSignedDataStreamGenerator.cs

示例15: SignerInfoGeneratorImpl

            internal SignerInfoGeneratorImpl(
                CmsSignedDataStreamGenerator	outer,
                AsymmetricKeyParameter			key,
                SignerIdentifier				signerIdentifier,
                string							digestOID,
                string							encOID,
                CmsAttributeTableGenerator		sAttr,
                CmsAttributeTableGenerator		unsAttr)
            {
                this.outer = outer;

                _signerIdentifier = signerIdentifier;
                _digestOID = digestOID;
                _encOID = encOID;
                _sAttr = sAttr;
                _unsAttr = unsAttr;
                _encName = Helper.GetEncryptionAlgName(_encOID);

                string digestName = Helper.GetDigestAlgName(_digestOID);
                string signatureName = digestName + "with" + _encName;

                if (_sAttr != null)
                {
                    _sig = Helper.GetSignatureInstance(signatureName);
                }
                else
                {
                    // Note: Need to use raw signatures here since we have already calculated the digest
                    if (_encName.Equals("RSA"))
                    {
                        _sig = Helper.GetSignatureInstance("RSA");
                    }
                    else if (_encName.Equals("DSA"))
                    {
                        _sig = Helper.GetSignatureInstance("NONEwithDSA");
                    }
                    // TODO Add support for raw PSS
                //					else if (_encName.equals("RSAandMGF1"))
                //					{
                //						_sig = CMSSignedHelper.INSTANCE.getSignatureInstance("NONEWITHRSAPSS", _sigProvider);
                //						try
                //						{
                //							// Init the params this way to avoid having a 'raw' version of each PSS algorithm
                //							Signature sig2 = CMSSignedHelper.INSTANCE.getSignatureInstance(signatureName, _sigProvider);
                //							PSSParameterSpec spec = (PSSParameterSpec)sig2.getParameters().getParameterSpec(PSSParameterSpec.class);
                //							_sig.setParameter(spec);
                //						}
                //						catch (Exception e)
                //						{
                //							throw new SignatureException("algorithm: " + _encName + " could not be configured.");
                //						}
                //					}
                    else
                    {
                        throw new SignatureException("algorithm: " + _encName + " not supported in base signatures.");
                    }
                }

                _sig.Init(true, new ParametersWithRandom(key, outer.rand));
            }
开发者ID:karino2,项目名称:wikipediaconv,代码行数:60,代码来源:CMSSignedDataStreamGenerator.cs


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