|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sshtools.publickey.SshPrivateKeyFileFactory
Private key format factory used to decode private key files. This factory currently supports SSHTools, OpenSSH and SSH1 encrypted private keys.
| Field Summary | |
static int |
OPENSSH_FORMAT
|
static int |
SSH1_FORMAT
|
static int |
SSHTOOLS_FORMAT
|
| Constructor Summary | |
SshPrivateKeyFileFactory()
|
|
| Method Summary | |
static void |
convertFile(java.io.File keyFile,
java.lang.String passphrase,
java.lang.String comment,
int toFormat,
java.io.File toFile)
Take a file in any of the supported public key formats and convert to the requested format. |
static SshPrivateKeyFile |
create(SshKeyPair pair,
java.lang.String passphrase,
java.lang.String comment,
int format)
|
static void |
createFile(SshKeyPair key,
java.lang.String passphrase,
java.lang.String comment,
int format,
java.io.File toFile)
Take a SshPrivateKey and write it to a file. |
static SshPrivateKeyFile |
parse(byte[] formattedkey)
Parse formatted data and return a suitable SshPrivateKeyFile implementation. |
static SshPrivateKeyFile |
parse(java.io.InputStream in)
Parse an InputStream 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 |
public static final int OPENSSH_FORMAT
public static final int SSHTOOLS_FORMAT
public static final int SSH1_FORMAT
| Constructor Detail |
public SshPrivateKeyFileFactory()
| Method Detail |
public static SshPrivateKeyFile parse(byte[] formattedkey)
throws java.io.IOException
formattedkey -
java.io.IOException
public static SshPrivateKeyFile parse(java.io.InputStream in)
throws java.io.IOException
in -
java.io.IOException
public static SshPrivateKeyFile create(SshKeyPair pair,
java.lang.String passphrase,
java.lang.String comment,
int format)
throws java.io.IOException
java.io.IOException
public static void createFile(SshKeyPair key,
java.lang.String passphrase,
java.lang.String comment,
int format,
java.io.File toFile)
throws java.io.IOException
key - comment - format - toFile -
java.io.IOException
public static void convertFile(java.io.File keyFile,
java.lang.String passphrase,
java.lang.String comment,
int toFormat,
java.io.File toFile)
throws java.io.IOException,
InvalidPassphraseException
keyFile - toFormat - toFile -
java.io.IOException
InvalidPassphraseException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||