public class SshPrivateKeyFileFactory extends Object
Modifier and Type | Field and Description |
---|---|
static int |
OPENSSH_FORMAT |
static int |
SSH1_FORMAT |
static int |
SSHTOOLS_FORMAT |
Constructor and Description |
---|
SshPrivateKeyFileFactory() |
Modifier and Type | Method and Description |
---|---|
static SshPrivateKeyFile |
create(SshKeyPair pair,
String passphrase,
String comment) |
static void |
createFile(SshKeyPair key,
String passphrase,
String comment,
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(InputStream in)
Parse an InputStream and return a suitable SshPrivateKeyFile implementation.
|
public static final int OPENSSH_FORMAT
public static final int SSHTOOLS_FORMAT
public static final int SSH1_FORMAT
public static SshPrivateKeyFile parse(byte[] formattedkey) throws IOException
formattedkey
- IOException
public static SshPrivateKeyFile parse(InputStream in) throws IOException
in
- IOException
public static SshPrivateKeyFile create(SshKeyPair pair, String passphrase, String comment) throws IOException
IOException
public static void createFile(SshKeyPair key, String passphrase, String comment, File toFile) throws IOException
key
- comment
- format
- toFile
- IOException
Copyright © 2016. All rights reserved.