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 protected
SshKeyPairFactory()
Creates a new SshKeyPairFactory object.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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)
-
-
-
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
-
-