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