Class AsymmetricKeyPair<P extends AsymmetricPublicKey,S extends AsymmetricPrivateKey>
java.lang.Object
org.bouncycastle.crypto.asymmetric.AsymmetricKeyPair<P,S>
public final class AsymmetricKeyPair<P extends AsymmetricPublicKey,S extends AsymmetricPrivateKey>
extends Object
Carrier class for a public key and its associated private key. This class will check the key
pair on construction.
-
Constructor Summary
ConstructorsConstructorDescriptionAsymmetricKeyPair
(P publicKey, S privateKey) Create a public/private key pair. -
Method Summary
Modifier and TypeMethodDescriptionReturn the private key of the pair.Return the public key of the pair.
-
Constructor Details
-
AsymmetricKeyPair
Create a public/private key pair.- Parameters:
publicKey
- the public key component.privateKey
- the private key component.- Throws:
IllegalArgumentException
- if the public and private key arguments are inconsistent.
-
-
Method Details
-
getPublicKey
Return the public key of the pair.- Returns:
- the public key.
-
getPrivateKey
Return the private key of the pair.- Returns:
- the private key.
-