Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
com.sshtools.j2ssh.transport.publickey.SshPublicKeyFile
public class SshPublicKeyFile
extends java.lang.Object
Constructor Summary | |
|
Method Summary | |
static SshPublicKeyFile |
|
String | |
byte[] |
|
String | |
SshPublicKeyFormat | |
byte[] | |
static SshPublicKeyFile |
|
static SshPublicKeyFile |
|
void |
|
void |
|
SshPublicKey | |
String |
|
protected SshPublicKeyFile(byte[] keyblob, SshPublicKeyFormat format)
Creates a new SshPublicKeyFile object.
- Parameters:
keyblob
-format
-
public static SshPublicKeyFile create(SshPublicKey key, SshPublicKeyFormat format)
- Parameters:
key
-format
-
- Returns:
public String getAlgorithm()
- Returns:
public byte[] getBytes()
- Returns:
public String getComment()
- Returns:
public byte[] getKeyBlob()
- Returns:
public static SshPublicKeyFile parse(File keyfile) throws InvalidSshKeyException, IOException
- Parameters:
keyfile
-
- Returns:
- Throws:
InvalidSshKeyException
-
public static SshPublicKeyFile parse(byte[] formattedKey) throws InvalidSshKeyException
- Parameters:
formattedKey
-
- Returns:
- Throws:
InvalidSshKeyException
-
public void setComment(String comment)
- Parameters:
comment
-
public void setFormat(SshPublicKeyFormat newFormat) throws InvalidSshKeyException
- Parameters:
newFormat
-
- Throws:
InvalidSshKeyException
-
public String toString()
- Returns: