Package com.sshtools.agent.openssh
Class SshAgentAddKey
java.lang.Object
com.sshtools.agent.AgentMessage
com.sshtools.agent.openssh.SshAgentAddKey
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new SshAgentAddKey object.SshAgentAddKey
(com.sshtools.common.ssh.components.SshPrivateKey prvkey, com.sshtools.common.ssh.components.SshPublicKey pubkey, String description, KeyConstraints constraints) Creates a new SshAgentAddKey object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
constructByteArray
(com.sshtools.common.util.ByteArrayWriter baw) void
constructMessage
(com.sshtools.common.util.ByteArrayReader bar) protected com.sshtools.common.ssh.components.SshKeyPair
decodeKey
(com.sshtools.common.util.ByteArrayReader bar) protected void
encodeKey
(com.sshtools.common.util.ByteArrayWriter baw) com.sshtools.common.ssh.components.SshPrivateKey
com.sshtools.common.ssh.components.SshPublicKey
Methods inherited from class com.sshtools.agent.AgentMessage
fromByteArray, getMessageType, toByteArray
-
Constructor Details
-
SshAgentAddKey
public SshAgentAddKey()Creates a new SshAgentAddKey object. -
SshAgentAddKey
public SshAgentAddKey(com.sshtools.common.ssh.components.SshPrivateKey prvkey, com.sshtools.common.ssh.components.SshPublicKey pubkey, String description, KeyConstraints constraints) Creates a new SshAgentAddKey object.- Parameters:
prvkey
-pubkey
-description
-constraints
-
-
-
Method Details
-
getPrivateKey
public com.sshtools.common.ssh.components.SshPrivateKey getPrivateKey()- Returns:
-
getPublicKey
public com.sshtools.common.ssh.components.SshPublicKey getPublicKey()- Returns:
-
getDescription
- Returns:
-
getKeyConstraints
- Returns:
-
getMessageName
- Overrides:
getMessageName
in classAgentMessage
- Returns:
-
constructByteArray
public void constructByteArray(com.sshtools.common.util.ByteArrayWriter baw) throws IOException, InvalidMessageException - Overrides:
constructByteArray
in classAgentMessage
- Parameters:
baw
-- Throws:
IOException
com.maverick.agent.exceptions.j2ssh.transport.InvalidMessageException
- DOCUMENT ME!InvalidMessageException
-
encodeKey
protected void encodeKey(com.sshtools.common.util.ByteArrayWriter baw) throws IOException, com.sshtools.common.ssh.SshException - Throws:
IOException
com.sshtools.common.ssh.SshException
-
decodeKey
protected com.sshtools.common.ssh.components.SshKeyPair decodeKey(com.sshtools.common.util.ByteArrayReader bar) throws IOException, com.sshtools.common.ssh.SshException - Throws:
IOException
com.sshtools.common.ssh.SshException
-
constructMessage
public void constructMessage(com.sshtools.common.util.ByteArrayReader bar) throws IOException, InvalidMessageException - Overrides:
constructMessage
in classAgentMessage
- Parameters:
bar
-- Throws:
IOException
com.maverick.agent.exceptions.j2ssh.transport.InvalidMessageException
- DOCUMENT ME!InvalidMessageException
-