Class SshKeyPairFactory
- java.lang.Object
-
- com.sshtools.j2ssh.transport.publickey.SshKeyPairFactory
-
public class SshKeyPairFactory extends java.lang.Object- Version:
- $Revision: 1.26 $
- Author:
- $author$
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSshKeyPairFactory()Creates a new SshKeyPairFactory object.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SshPrivateKeydecodePrivateKey(byte[] encoded)static SshPublicKeydecodePublicKey(byte[] encoded)static java.lang.StringgetDefaultPublicKey()static java.util.ListgetSupportedKeys()static voidinitialize()static SshKeyPairnewInstance(java.lang.String methodName)static booleansupportsKey(java.lang.String algorithm)
-
-
-
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:
InvalidSshKeyExceptionAlgorithmNotSupportedException
-
decodePublicKey
public static SshPublicKey decodePublicKey(byte[] encoded) throws InvalidSshKeyException, AlgorithmNotSupportedException
- Parameters:
encoded-- Returns:
- Throws:
InvalidSshKeyExceptionAlgorithmNotSupportedException
-
-