Class JcaPEMKeyConverter
java.lang.Object
org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetKeyPair(PEMKeyPair keyPair) Convert a PEMKeyPair into a KeyPair, returning the converted result.getPrivateKey(org.bouncycastle.asn1.pkcs.PrivateKeyInfo privateKeyInfo) getPublicKey(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo publicKeyInfo) setAlgorithmMapping(org.bouncycastle.asn1.ASN1ObjectIdentifier algOid, String algorithmName) Set the algorithm mapping for a particular OID to the given algorithm name.setProvider(String providerName) setProvider(Provider provider)
-
Constructor Details
-
JcaPEMKeyConverter
public JcaPEMKeyConverter()
-
-
Method Details
-
setProvider
-
setProvider
-
setAlgorithmMapping
public JcaPEMKeyConverter setAlgorithmMapping(org.bouncycastle.asn1.ASN1ObjectIdentifier algOid, String algorithmName) Set the algorithm mapping for a particular OID to the given algorithm name.- Parameters:
algOid- object identifier used to identify the public/private keyalgorithmName- algorithm name we want to map to in the provider.- Returns:
- the current builder instance.
-
getKeyPair
Convert a PEMKeyPair into a KeyPair, returning the converted result.- Parameters:
keyPair- the PEMKeyPair to be converted.- Returns:
- the result of the conversion
- Throws:
PEMException- if an exception is thrown attempting to do the conversion.
-
getPublicKey
public PublicKey getPublicKey(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo publicKeyInfo) throws PEMException - Throws:
PEMException
-
getPrivateKey
public PrivateKey getPrivateKey(org.bouncycastle.asn1.pkcs.PrivateKeyInfo privateKeyInfo) throws PEMException - Throws:
PEMException
-