Package com.sshtools.j2ssh.transport.kex
Class SshKeyExchange
java.lang.Object
com.sshtools.j2ssh.transport.kex.SshKeyExchange
- Direct Known Subclasses:
DhGroup1Sha1
- Version:
- $Revision: 1.22 $
- Author:
- $author$
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected byte[]
protected byte[]
protected SshMessageStore
protected BigInteger
protected byte[]
protected TransportProtocol
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
byte[]
byte[]
void
init
(TransportProtocol transport) protected abstract void
onInit()
abstract void
performClientExchange
(String clientId, String serverId, byte[] clientKexInit, byte[] serverKexInit) abstract void
performServerExchange
(String clientId, String serverId, byte[] clientKexInit, byte[] serverKexInit, SshPrivateKey prvkey) void
reset()
-
Field Details
-
secret
-
messageStore
-
exchangeHash
protected byte[] exchangeHash -
hostKey
protected byte[] hostKey -
signature
protected byte[] signature -
transport
-
-
Constructor Details
-
SshKeyExchange
public SshKeyExchange()Creates a new SshKeyExchange object.
-
-
Method Details
-
getExchangeHash
public byte[] getExchangeHash()- Returns:
-
getHostKey
public byte[] getHostKey()- Returns:
-
getSecret
- Returns:
-
getSignature
public byte[] getSignature()- Returns:
-
init
- Parameters:
transport
-- Throws:
IOException
-
onInit
- Throws:
IOException
-
performClientExchange
public abstract void performClientExchange(String clientId, String serverId, byte[] clientKexInit, byte[] serverKexInit) throws IOException - Parameters:
clientId
-serverId
-clientKexInit
-serverKexInit
-- Throws:
IOException
-
performServerExchange
public abstract void performServerExchange(String clientId, String serverId, byte[] clientKexInit, byte[] serverKexInit, SshPrivateKey prvkey) throws IOException - Parameters:
clientId
-serverId
-clientKexInit
-serverKexInit
-prvkey
-- Throws:
IOException
-
reset
public void reset()
-