Class SshKeyExchange

java.lang.Object
com.sshtools.j2ssh.transport.kex.SshKeyExchange
Direct Known Subclasses:
DhGroup1Sha1

public abstract class SshKeyExchange extends Object
Version:
$Revision: 1.22 $
Author:
$author$
  • Field Details

    • secret

      protected BigInteger secret
    • messageStore

      protected SshMessageStore messageStore
    • exchangeHash

      protected byte[] exchangeHash
    • hostKey

      protected byte[] hostKey
    • signature

      protected byte[] signature
    • transport

      protected TransportProtocol transport
  • Constructor Details

    • SshKeyExchange

      public SshKeyExchange()
      Creates a new SshKeyExchange object.
  • Method Details

    • getExchangeHash

      public byte[] getExchangeHash()
      Returns:
    • getHostKey

      public byte[] getHostKey()
      Returns:
    • getSecret

      public BigInteger getSecret()
      Returns:
    • getSignature

      public byte[] getSignature()
      Returns:
    • init

      public void init(TransportProtocol transport) throws IOException
      Parameters:
      transport -
      Throws:
      IOException
    • onInit

      protected abstract void onInit() throws IOException
      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()