com.sshtools.j2ssh.transport.publickey
Class SshKeyPairFactory

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

public class SshKeyPairFactory
extends java.lang.Object

Version:
$Revision: 1.1 $
Author:
$author$

Field Summary
private static java.lang.String defaultAlgorithm
           
private static org.apache.commons.logging.Log log
           
private static java.util.Map pks
           
 
Constructor Summary
protected SshKeyPairFactory()
          Creates a new SshKeyPairFactory object.
 
Method Summary
static SshPrivateKey decodePrivateKey(byte[] encoded)
           
static SshPublicKey decodePublicKey(byte[] encoded)
           
static java.lang.String getDefaultPublicKey()
           
static java.util.List getSupportedKeys()
           
static void initialize()
           
static SshKeyPair newInstance(java.lang.String methodName)
           
static boolean supportsKey(java.lang.String algorithm)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pks

private static java.util.Map pks

defaultAlgorithm

private static java.lang.String defaultAlgorithm

log

private static org.apache.commons.logging.Log log
Constructor Detail

SshKeyPairFactory

protected SshKeyPairFactory()
Creates a new SshKeyPairFactory object.

Method Detail

initialize

public static void initialize()

getDefaultPublicKey

public static java.lang.String getDefaultPublicKey()
Returns:

getSupportedKeys

public static java.util.List getSupportedKeys()
Returns:

newInstance

public static SshKeyPair newInstance(java.lang.String methodName)
                              throws AlgorithmNotSupportedException
Parameters:
methodName -
Returns:
Throws:
AlgorithmNotSupportedException

supportsKey

public static boolean supportsKey(java.lang.String algorithm)
Parameters:
algorithm -
Returns:

decodePrivateKey

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

decodePublicKey

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