com.sshtools.j2ssh.transport.publickey
Class SshKeyGenerator

java.lang.Object
  extended by com.sshtools.j2ssh.transport.publickey.SshKeyGenerator

public class SshKeyGenerator
extends java.lang.Object


Field Summary
private static int bits
           
private static boolean changePass
           
private static java.lang.String filename
           
private static boolean guiAvailable
           
private static boolean toOpenSSH
           
private static boolean toSECSH
           
private static java.lang.String type
           
private static boolean useGUI
           
 
Constructor Summary
SshKeyGenerator()
          Creates a new SshKeyGenerator object.
 
Method Summary
private static void changePassphrase(java.io.File f)
           
static void changePassphrase(java.io.File f, java.lang.String oldPassphrase, java.lang.String newPassphrase)
           
static java.lang.String convertPublicKeyFile(java.io.File f, SshPublicKeyFormat convert)
           
 void generateKeyPair(java.lang.String type, int bits, java.lang.String filename, java.lang.String username, java.lang.String passphrase)
           
static void main(java.lang.String[] args)
           
private static void printUsage()
           
static void processCommandLine(java.lang.String[] args)
           
private static java.lang.String promptForPassphrase(boolean confirm)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filename

private static java.lang.String filename

type

private static java.lang.String type

bits

private static int bits

useGUI

private static boolean useGUI

guiAvailable

private static boolean guiAvailable

toOpenSSH

private static boolean toOpenSSH

toSECSH

private static boolean toSECSH

changePass

private static boolean changePass
Constructor Detail

SshKeyGenerator

public SshKeyGenerator()
Creates a new SshKeyGenerator object.

Method Detail

generateKeyPair

public void generateKeyPair(java.lang.String type,
                            int bits,
                            java.lang.String filename,
                            java.lang.String username,
                            java.lang.String passphrase)
                     throws java.io.IOException
Parameters:
type -
bits -
filename -
username -
passphrase -
Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
Parameters:
args -

processCommandLine

public static void processCommandLine(java.lang.String[] args)
Parameters:
args -

changePassphrase

private static void changePassphrase(java.io.File f)

changePassphrase

public static void changePassphrase(java.io.File f,
                                    java.lang.String oldPassphrase,
                                    java.lang.String newPassphrase)
                             throws java.io.IOException,
                                    InvalidSshKeyException
Parameters:
f -
oldPassphrase -
newPassphrase -
Throws:
java.io.IOException
InvalidSshKeyException

convertPublicKeyFile

public static java.lang.String convertPublicKeyFile(java.io.File f,
                                                    SshPublicKeyFormat convert)
                                             throws InvalidSshKeyException,
                                                    java.io.IOException
Parameters:
f -
convert -
Returns:
Throws:
InvalidSshKeyException
java.io.IOException

printUsage

private static void printUsage()

promptForPassphrase

private static java.lang.String promptForPassphrase(boolean confirm)
                                             throws java.io.IOException
Throws:
java.io.IOException