Top Description Fields Constructors Methods
org.bouncycastle.jcajce

public Class ConsistentKeyPair

extends Object
Class Inheritance
Imports
java.math.BigInteger, java.security.AccessController, .PrivateKey, .PrivilegedAction, .PublicKey, java.security.interfaces.DSAKey, .DSAParams, .DSAPrivateKey, .DSAPublicKey, .ECKey, .ECPrivateKey, .ECPublicKey, .RSAKey, .RSAPrivateKey, .RSAPublicKey, javax.crypto.interfaces.DHKey, .DHPrivateKey, .DHPublicKey, javax.crypto.spec.DHParameterSpec, org.bouncycastle.jcajce.interfaces.DSTU4145Key, .DSTU4145PrivateKey, .DSTU4145PublicKey, .ECGOST3410PrivateKey, .ECGOST3410PublicKey, .EdDSAKey, .GOST3410Key, .GOST3410PrivateKey, .GOST3410PublicKey, .XDHKey, org.bouncycastle.jcajce.spec.DSTU4145ParameterSpec, .ECDomainParameterSpec, .GOST3410DomainParameterSpec, .GOST3410ParameterSpec, org.bouncycastle.util.Arrays

Carrier class for a key pair which validates the consistency of the keys at construction time.

Field Summary

Modifier and TypeField and Description
private PrivateKey
private PublicKey

Constructor Summary

AccessConstructor and Description
public
ConsistentKeyPair(final PublicKey
the public key component.
publicKey
,
final PrivateKey
the private key component.
privateKey
)

Create a public/private key pair.

Method Summary

Modifier and TypeMethod and Description
private void
public PrivateKey

Returns:

the private key in the pair.
getPrivate
()

Return the private key component.

public PublicKey

Returns:

the public key in the pair.
getPublic
()

Return the public key component.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

privateKeyback to summary
private PrivateKey privateKey
publicKeyback to summary
private PublicKey publicKey

Constructor Detail

ConsistentKeyPairback to summary
public ConsistentKeyPair(final PublicKey publicKey, final PrivateKey privateKey)

Create a public/private key pair.

Parameters
publicKey:PublicKey

the public key component.

privateKey:PrivateKey

the private key component.

Exceptions
IllegalArgumentException:
if the public and private key arguments are inconsistent.

Method Detail

checkKeyPairForConsistencyback to summary
private void checkKeyPairForConsistency(PublicKey publicKey, PrivateKey privateKey)
getPrivateback to summary
public PrivateKey getPrivate()

Return the private key component.

Returns:PrivateKey

the private key in the pair.

getPublicback to summary
public PublicKey getPublic()

Return the public key component.

Returns:PublicKey

the public key in the pair.