public class JcaPEMKeyConverter
extends java.lang.Object
| Constructor and Description |
|---|
JcaPEMKeyConverter() |
| Modifier and Type | Method and Description |
|---|---|
java.security.KeyPair |
getKeyPair(PEMKeyPair keyPair)
Convert a PEMKeyPair into a KeyPair, returning the converted result.
|
java.security.PrivateKey |
getPrivateKey(org.bouncycastle.asn1.pkcs.PrivateKeyInfo privateKeyInfo) |
java.security.PublicKey |
getPublicKey(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo publicKeyInfo) |
JcaPEMKeyConverter |
setAlgorithmMapping(org.bouncycastle.asn1.ASN1ObjectIdentifier algOid,
java.lang.String algorithmName)
Set the algorithm mapping for a particular OID to the given algorithm name.
|
JcaPEMKeyConverter |
setProvider(java.security.Provider provider) |
JcaPEMKeyConverter |
setProvider(java.lang.String providerName) |
public JcaPEMKeyConverter setProvider(java.security.Provider provider)
public JcaPEMKeyConverter setProvider(java.lang.String providerName)
public JcaPEMKeyConverter setAlgorithmMapping(org.bouncycastle.asn1.ASN1ObjectIdentifier algOid, java.lang.String algorithmName)
algOid - object identifier used to identify the public/private keyalgorithmName - algorithm name we want to map to in the provider.public java.security.KeyPair getKeyPair(PEMKeyPair keyPair) throws PEMException
keyPair - the PEMKeyPair to be converted.PEMException - if an exception is thrown attempting to do the conversion.public java.security.PublicKey getPublicKey(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo publicKeyInfo)
throws PEMException
PEMExceptionpublic java.security.PrivateKey getPrivateKey(org.bouncycastle.asn1.pkcs.PrivateKeyInfo privateKeyInfo)
throws PEMException
PEMException