Class DiffieHellmanGroup

java.lang.Object
com.sshtools.client.SshKeyExchangeClient
com.sshtools.client.components.DiffieHellmanGroup
All Implemented Interfaces:
com.sshtools.common.ssh.components.Component, com.sshtools.common.ssh.components.SshComponent, com.sshtools.common.ssh.SecureComponent, com.sshtools.synergy.ssh.components.SshKeyExchange<SshClientContext>
Direct Known Subclasses:
DiffieHellmanGroup14Sha1JCE, DiffieHellmanGroup14Sha256JCE, DiffieHellmanGroup15Sha512JCE, DiffieHellmanGroup16Sha512JCE, DiffieHellmanGroup17Sha512JCE, DiffieHellmanGroup18Sha512JCE, DiffieHellmanGroup1Sha1JCE

public abstract class DiffieHellmanGroup extends SshKeyExchangeClient
Implementation of the required SSH Transport Protocol key exchange method "diffie-hellman-group14-sha1".
  • Method Details

    • getAlgorithm

      public String getAlgorithm()
      Get the algorithm name for this key exchange
      Returns:
      "diffie-hellman-group14-sha1"
    • init

      public void init(com.sshtools.synergy.ssh.SshTransport<SshClientContext> transport, String clientId, String serverId, byte[] clientKexInit, byte[] serverKexInit, com.sshtools.common.ssh.components.SshPrivateKey prvkey, com.sshtools.common.ssh.components.SshPublicKey pubkey, boolean firstPacketFollows, boolean useFirstPacket) throws IOException, com.sshtools.common.ssh.SshException
      Throws:
      IOException
      com.sshtools.common.ssh.SshException
    • getProvider

      public String getProvider()
    • processMessage

      public boolean processMessage(byte[] m) throws com.sshtools.common.ssh.SshException, IOException
      Description copied from class: SshKeyExchangeClient
      Process a key exchange message
      Specified by:
      processMessage in interface com.sshtools.synergy.ssh.components.SshKeyExchange<SshClientContext>
      Specified by:
      processMessage in class SshKeyExchangeClient
      Returns:
      boolean, indicating whether it has processed the message or not
      Throws:
      com.sshtools.common.ssh.SshException
      IOException
    • isKeyExchangeMessage

      public boolean isKeyExchangeMessage(int messageid)
    • test

      public void test() throws IOException, com.sshtools.common.ssh.SshException
      Throws:
      IOException
      com.sshtools.common.ssh.SshException