com.sshtools.j2ssh.transport.publickey
Class SshKeyPair

java.lang.Object
  extended by com.sshtools.j2ssh.transport.publickey.SshKeyPair
Direct Known Subclasses:
SshDssKeyPair, SshRsaKeyPair

public abstract class SshKeyPair
extends java.lang.Object

Version:
$Revision: 1.17 $
Author:
$author$

Constructor Summary
SshKeyPair()
          Creates a new SshKeyPair object.
 
Method Summary
abstract  SshPrivateKey decodePrivateKey(byte[] encoded)
           
abstract  SshPublicKey decodePublicKey(byte[] encoded)
           
abstract  void generate(int bits)
           
 SshPrivateKey getPrivateKey()
           
 SshPublicKey getPublicKey()
           
 SshPrivateKey setPrivateKey(byte[] encoded)
           
 void setPrivateKey(SshPrivateKey key)
           
 SshPublicKey setPublicKey(byte[] encoded)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SshKeyPair

public SshKeyPair()
Creates a new SshKeyPair object.

Method Detail

generate

public abstract void generate(int bits)
Parameters:
bits -

setPrivateKey

public void setPrivateKey(SshPrivateKey key)
Parameters:
key -

setPrivateKey

public SshPrivateKey setPrivateKey(byte[] encoded)
                            throws InvalidSshKeyException
Parameters:
encoded -
Returns:
Throws:
InvalidSshKeyException

getPrivateKey

public SshPrivateKey getPrivateKey()
Returns:

setPublicKey

public SshPublicKey setPublicKey(byte[] encoded)
                          throws InvalidSshKeyException
Parameters:
encoded -
Returns:
Throws:
InvalidSshKeyException

getPublicKey

public SshPublicKey getPublicKey()
Returns:

decodePrivateKey

public abstract SshPrivateKey decodePrivateKey(byte[] encoded)
                                        throws InvalidSshKeyException
Parameters:
encoded -
Returns:
Throws:
InvalidSshKeyException

decodePublicKey

public abstract SshPublicKey decodePublicKey(byte[] encoded)
                                      throws InvalidSshKeyException
Parameters:
encoded -
Returns:
Throws:
InvalidSshKeyException


Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.