com.sshtools.publickey
Class SshPrivateKeyFileFactory

java.lang.Object
  extended bycom.sshtools.publickey.SshPrivateKeyFileFactory

public class SshPrivateKeyFileFactory
extends java.lang.Object

Private key format factory used to decode private key files. This factory currently supports SSHTools, OpenSSH and SSH1 encrypted private keys.

Author:
Lee David Painter

Field Summary
static int OPENSSH_FORMAT
           
static int SSH1_FORMAT
           
static int SSHTOOLS_FORMAT
           
 
Constructor Summary
SshPrivateKeyFileFactory()
           
 
Method Summary
static SshPrivateKeyFile create(SshKeyPair pair, java.lang.String passphrase, java.lang.String comment, int format)
           
static SshPrivateKeyFile parse(byte[] formattedkey)
          Parse formatted data and return a suitable SshPrivateKeyFile implemenation.
static SshPrivateKeyFile parse(java.io.InputStream in)
          Parse an InputStrewam and return a suitable SshPrivateKeyFile implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPENSSH_FORMAT

public static final int OPENSSH_FORMAT
See Also:
Constant Field Values

SSHTOOLS_FORMAT

public static final int SSHTOOLS_FORMAT
See Also:
Constant Field Values

SSH1_FORMAT

public static final int SSH1_FORMAT
See Also:
Constant Field Values
Constructor Detail

SshPrivateKeyFileFactory

public SshPrivateKeyFileFactory()
Method Detail

parse

public static SshPrivateKeyFile parse(byte[] formattedkey)
                               throws java.io.IOException
Parse formatted data and return a suitable SshPrivateKeyFile implemenation.

Parameters:
formattedkey -
Returns:
Throws:
java.io.IOException

parse

public static SshPrivateKeyFile parse(java.io.InputStream in)
                               throws java.io.IOException
Parse an InputStrewam and return a suitable SshPrivateKeyFile implementation.

Parameters:
in -
Returns:
Throws:
java.io.IOException

create

public static SshPrivateKeyFile create(SshKeyPair pair,
                                       java.lang.String passphrase,
                                       java.lang.String comment,
                                       int format)
                                throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2003 3SP LTD. All Rights Reserved.