Top Description Fields Constructors Methods
org.bouncycastle.openpgp.operator.jcajce

public Class JcaPGPKeyPair

extends PGPKeyPair
Class Inheritance
Imports
java.security.KeyPair, .PrivateKey, .PublicKey, java.util.Date, org.bouncycastle.bcpg.PublicKeyPacket, org.bouncycastle.openpgp.PGPAlgorithmParameters, .PGPException, .PGPKeyPair, .PGPPrivateKey, .PGPPublicKey

A PGP key pair class that is constructed from JCA/JCE key pairs.

Field Summary

Inherited from org.bouncycastle.openpgp.PGPKeyPair:
privpub

Constructor Summary

AccessConstructor and Description
public
JcaPGPKeyPair(int
the PGP algorithm the key is for.
algorithm
,
KeyPair
the public/private key pair to convert.
keyPair
,
Date
the creation date to associate with the key pair.
date
)
Deprecated use versioned JcaPGPKeyPair(int, int, KeyPair, Date) instead

Construct version 4 PGP key pair from a JCA/JCE key pair.

public
JcaPGPKeyPair(int
key version.
version
,
int
the PGP algorithm the key is for.
algorithm
,
KeyPair
the public/private key pair to convert.
keyPair
,
Date
the creation date to associate with the key pair.
date
)

Construct PGP key pair from a JCA/JCE key pair.

public
JcaPGPKeyPair(int
the PGP algorithm the key is for.
algorithm
,
PGPAlgorithmParameters
additional parameters to be stored against the public key.
parameters
,
KeyPair
the public/private key pair to convert.
keyPair
,
Date
the creation date to associate with the key pair.
date
)

Construct version 4 PGP key pair from a JCA/JCE key pair.

public
JcaPGPKeyPair(int
key version.
version
,
int
the PGP algorithm the key is for.
algorithm
,
PGPAlgorithmParameters
additional parameters to be stored against the public key.
parameters
,
KeyPair
the public/private key pair to convert.
keyPair
,
Date
the creation date to associate with the key pair.
date
)

Construct PGP key pair from a JCA/JCE key pair.

Method Summary

Modifier and TypeMethod and Description
private static PGPPrivateKey
private static PGPPublicKey
getPublicKey(int algorithm, PublicKey pubKey, Date date)
Deprecated

private static PGPPublicKey
getPublicKey(int version, int algorithm, PublicKey pubKey, Date date)

private static PGPPublicKey
getPublicKey(int algorithm, PGPAlgorithmParameters algorithmParameters, PublicKey pubKey, Date date)
Deprecated

private static PGPPublicKey
getPublicKey(int version, int algorithm, PGPAlgorithmParameters algorithmParameters, PublicKey pubKey, Date date)

Inherited from org.bouncycastle.openpgp.PGPKeyPair:
asSubkeygetKeyIDgetKeyIdentifiergetPrivateKeygetPublicKey

Constructor Detail

JcaPGPKeyPairback to summary
public JcaPGPKeyPair(int algorithm, KeyPair keyPair, Date date) throws PGPException

Deprecated

use versioned JcaPGPKeyPair(int, int, KeyPair, Date) instead

Construct version 4 PGP key pair from a JCA/JCE key pair.

Parameters
algorithm:int

the PGP algorithm the key is for.

keyPair:KeyPair

the public/private key pair to convert.

date:Date

the creation date to associate with the key pair.

Annotations
@Deprecated
Exceptions
PGPException:
if conversion fails.
JcaPGPKeyPairback to summary
public JcaPGPKeyPair(int version, int algorithm, KeyPair keyPair, Date date) throws PGPException

Construct PGP key pair from a JCA/JCE key pair.

Parameters
version:int

key version.

algorithm:int

the PGP algorithm the key is for.

keyPair:KeyPair

the public/private key pair to convert.

date:Date

the creation date to associate with the key pair.

Exceptions
PGPException:
if conversion fails.
JcaPGPKeyPairback to summary
public JcaPGPKeyPair(int algorithm, PGPAlgorithmParameters parameters, KeyPair keyPair, Date date) throws PGPException

Construct version 4 PGP key pair from a JCA/JCE key pair.

Parameters
algorithm:int

the PGP algorithm the key is for.

parameters:PGPAlgorithmParameters

additional parameters to be stored against the public key.

keyPair:KeyPair

the public/private key pair to convert.

date:Date

the creation date to associate with the key pair.

Annotations
@Deprecated
Exceptions
PGPException:
if conversion fails.
JcaPGPKeyPairback to summary
public JcaPGPKeyPair(int version, int algorithm, PGPAlgorithmParameters parameters, KeyPair keyPair, Date date) throws PGPException

Construct PGP key pair from a JCA/JCE key pair.

Parameters
version:int

key version.

algorithm:int

the PGP algorithm the key is for.

parameters:PGPAlgorithmParameters

additional parameters to be stored against the public key.

keyPair:KeyPair

the public/private key pair to convert.

date:Date

the creation date to associate with the key pair.

Exceptions
PGPException:
if conversion fails.

Method Detail

getPrivateKeyback to summary
private static PGPPrivateKey getPrivateKey(PGPPublicKey pub, PrivateKey privKey) throws PGPException
getPublicKeyback to summary
private static PGPPublicKey getPublicKey(int algorithm, PublicKey pubKey, Date date) throws PGPException

Deprecated

Annotations
@Deprecated
getPublicKeyback to summary
private static PGPPublicKey getPublicKey(int version, int algorithm, PublicKey pubKey, Date date) throws PGPException
getPublicKeyback to summary
private static PGPPublicKey getPublicKey(int algorithm, PGPAlgorithmParameters algorithmParameters, PublicKey pubKey, Date date) throws PGPException

Deprecated

Annotations
@Deprecated
getPublicKeyback to summary
private static PGPPublicKey getPublicKey(int version, int algorithm, PGPAlgorithmParameters algorithmParameters, PublicKey pubKey, Date date) throws PGPException