This class is
a simple container for a PublicKey and a
PrivateKey object. Because a
KeyPair contains an unprotected private key, it
must be used with as much caution as a PrivateKey
object.
Figure 14-20. java.security.KeyPair

public final class KeyPair implements Serializable {
// Public Constructors
public KeyPair (PublicKey publicKey , PrivateKey privateKey );
// Public Instance Methods
public PrivateKey getPrivate ( );
public PublicKey getPublic ( );
}
Passed To
Signer.setKeyPair( )
Returned By
KeyPairGenerator.{generateKeyPair( ),
genKeyPair( )},
KeyPairGeneratorSpi.generateKeyPair( )