• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# CmsAttributeTableGenerator类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: CreateGenerator

        private SignerInfoGenerator CreateGenerator(ISignatureCalculator contentSigner, SignerIdentifier sigId)
        {
            if (directSignature)
            {
                return new SignerInfoGenerator(sigId, contentSigner, true);
            }

            if (signedGen != null || unsignedGen != null)
            {
                if (signedGen == null)
                {
                    signedGen = new DefaultSignedAttributeTableGenerator();
                }

                return new SignerInfoGenerator(sigId, contentSigner, signedGen, unsignedGen);
            }

            return new SignerInfoGenerator(sigId, contentSigner);
        }
开发者ID:martijn00,项目名称:BouncyCastle-PCL,代码行数:19,代码来源:SignerInfoGenerator.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CmsEntities类代码示例发布时间:2022-05-24
下一篇:
C# Cmdlet类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap