Class SshPublicKeyFile
java.lang.Object
com.sshtools.j2ssh.transport.publickey.SshPublicKeyFile
- Version:
- $Revision: 1.20 $
- Author:
- $author$
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SshPublicKeyFile
(byte[] keyblob, SshPublicKeyFormat format) Creates a new SshPublicKeyFile object. -
Method Summary
Modifier and TypeMethodDescriptionstatic SshPublicKeyFile
create
(SshPublicKey key, SshPublicKeyFormat format) byte[]
getBytes()
byte[]
static SshPublicKeyFile
parse
(byte[] formattedKey) static SshPublicKeyFile
void
setComment
(String comment) void
setFormat
(SshPublicKeyFormat newFormat) toString()
-
Constructor Details
-
SshPublicKeyFile
Creates a new SshPublicKeyFile object.- Parameters:
keyblob
-format
-
-
-
Method Details
-
getBytes
public byte[] getBytes()- Returns:
-
getComment
- Returns:
-
setComment
- Parameters:
comment
-
-
getKeyBlob
public byte[] getKeyBlob()- Returns:
-
create
- Parameters:
key
-format
-- Returns:
-
parse
- Parameters:
keyfile
-- Returns:
- Throws:
InvalidSshKeyException
IOException
-
parse
- Parameters:
formattedKey
-- Returns:
- Throws:
InvalidSshKeyException
-
getAlgorithm
- Returns:
-
setFormat
- Parameters:
newFormat
-- Throws:
InvalidSshKeyException
-
getFormat
- Returns:
-
toPublicKey
- Returns:
- Throws:
IOException
-
toString
-