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.KeyPairpublic final class KeyPair implements Serializable { // Public Constructors public KeyPair (PublicKey publicKey , PrivateKey privateKey ); // Public Instance Methods public PrivateKey getPrivate ( ); public PublicKey getPublic ( ); } Passed ToSigner.setKeyPair( ) Returned ByKeyPairGenerator.{generateKeyPair( ) , genKeyPair( )} , KeyPairGeneratorSpi.generateKeyPair( ) |