BouncyCastle 算法标识符

cal*_*afa 4 rsa bouncycastle

如何创建org.bouncycastle.asn1.x509.AlgorithmIdentifierRSA OAEP的新实例?为了能够在这里使用它:

JceKeyTransRecipientInfoGenerator(java.security.cert.X509Certificate recipientCert, org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier)
Run Code Online (Sandbox Code Playgroud)

jan*_*ndd 5

使用当前的 BouncyCastleVersions,您可以使用一个常量 org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers

AlgorithmIdentifier algorithmIdentifier = new AlgorithmIdentifier(PKCSObjectIdentifiers.id_RSAES_OAEP);
Run Code Online (Sandbox Code Playgroud)