com.mindbright.jca.security
Class KeyPair

java.lang.Object
  extended by com.mindbright.jca.security.KeyPair

public final class KeyPair
extends java.lang.Object

Handles a public/private pair of keys

See Also:
KeyPairGenerator, SSH2KeyPairFile

Constructor Summary
KeyPair(PublicKey publicKey, PrivateKey privateKey)
          Creates a new key pair
 
Method Summary
 PrivateKey getPrivate()
          Get the private key of the pair
 PublicKey getPublic()
          Get the public key of the pair
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyPair

public KeyPair(PublicKey publicKey,
               PrivateKey privateKey)
Creates a new key pair

Parameters:
publicKey - public key in key pair
privateKey - private key in key pair
Method Detail

getPublic

public PublicKey getPublic()
Get the public key of the pair

Returns:
the public key

getPrivate

public PrivateKey getPrivate()
Get the private key of the pair

Returns:
the private key