jssh
Class RSAPrivateKeyFile

java.lang.Object
  |
  +--jssh.RSAPrivateKeyFile

public class RSAPrivateKeyFile
extends java.lang.Object

This class encapsulates the properties and behaviour of an SSH RSA private-key file. The file has the following structure:


Constructor Summary
RSAPrivateKeyFile(java.lang.String filename_)
          Constructor
 
Method Summary
 int getCipherType()
           
 java.lang.String getComment()
           
 RSAPrivateKey getPrivateKey()
          This method should be called if the key is not encrypted, ie getCipherType() returns SSH_CIPHER_NONE;
 RSAPrivateKey getPrivateKey(java.lang.String passphrase_)
          This method should be called if the key is encrypted, ie if getCipherType() returns SSH_CIPHER_3DES.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RSAPrivateKeyFile

public RSAPrivateKeyFile(java.lang.String filename_)
                  throws java.io.IOException
Constructor

Method Detail

getCipherType

public int getCipherType()

getComment

public java.lang.String getComment()

getPrivateKey

public RSAPrivateKey getPrivateKey()
                            throws java.io.IOException
This method should be called if the key is not encrypted, ie getCipherType() returns SSH_CIPHER_NONE;

java.io.IOException

getPrivateKey

public RSAPrivateKey getPrivateKey(java.lang.String passphrase_)
                            throws java.io.IOException
This method should be called if the key is encrypted, ie if getCipherType() returns SSH_CIPHER_3DES.

java.io.IOException