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.
public final classKeyPair implements Serializable { // Public Constructors public
KeyPair (PublicKey
publicKey , PrivateKey
privateKey ); // Public Instance Methods public PrivateKey
getPrivate ( ); public PublicKey
getPublic ( ); }
Signer.setKeyPair( )
KeyPairGenerator.{generateKeyPair( ), genKeyPair( )}, KeyPairGeneratorSpi.generateKeyPair( )