BouncyCastle AlgorithmIdentifier

bouncycastle, rsa

Solution

with current BouncyCastleVersions you can use a constant from `org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers`

AlgorithmIdentifier algorithmIdentifier = new AlgorithmIdentifier(PKCSObjectIdentifiers.id_RSAES_OAEP);

Problem

How can i create a new instance of `org.bouncycastle.asn1.x509.AlgorithmIdentifier` of RSA OAEP? in order to be able to use it here: ``` JceKeyTransRecipientInfoGenerator(java.security.cert.X509Certificate recipientCert, org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier) ```

Original source