Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/opencv/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
BounCycastle轻量级API。到底是什么?_Api_Bouncycastle - Fatal编程技术网

BounCycastle轻量级API。到底是什么?

BounCycastle轻量级API。到底是什么?,api,bouncycastle,Api,Bouncycastle,我不太明白,什么是轻量级API以及如何使用它 任何地方都有编译过的jar吗?我只能下载源代码 他们说“从1.47开始,版本2的API在pcpkix包中” e、 g.一段代码 Store certs = new JcaCertStore(certList); AlgorithmIdentifier sigAlgId = new DefaultSignatureAlgorithmIdentifierFinder().find(algorithmName);

我不太明白,什么是轻量级API以及如何使用它

  • 任何地方都有编译过的jar吗?我只能下载源代码
  • 他们说“从1.47开始,版本2的API在pcpkix包中”
  • e、 g.一段代码

            Store certs = new JcaCertStore(certList);
            AlgorithmIdentifier sigAlgId = new DefaultSignatureAlgorithmIdentifierFinder().find(algorithmName);
            AlgorithmIdentifier digAlgId = new DefaultDigestAlgorithmIdentifierFinder().find(sigAlgId);
    
            ContentSigner sigGen = new BcRSAContentSignerBuilder(sigAlgId, digAlgId).build(toRSAPrivateKey(pKey));
            CMSSignedDataGenerator gen = new CMSSignedDataGenerator();
    
            X509CertificateHolder certHolder = new X509CertificateHolder(cert.getEncoded());
            gen.addSignerInfoGenerator(new SignerInfoGeneratorBuilder(new BcDigestCalculatorProvider()).setDirectSignature(true).build(sigGen, certHolder));
            gen.addCertificates(certs);
            .....
            ByteArrayOutputStream bOut = new ByteArrayOutputStream();
    
            DEROutputStream dOut = new DEROutputStream(bOut);
            dOut.writeObject(s.toASN1Structure().toASN1Primitive());
            dOut.close();
    
    Store、AlgorithmIdentifier、DEROutputStream位于bcprovider(或lcrypto)jar中。 BcDigestCalculatorProvider、BcRSAContentSignerBuilder位于pcpix jar中

    算法识别器、存储等不是轻量级API的一部分

    3.为了使用轻量级API,我必须使用几个jar还是有多个一体式jar