Class SshKeyExchange

  • Direct Known Subclasses:
    DhGroup1Sha1

    public abstract class SshKeyExchange
    extends java.lang.Object
    Version:
    $Revision: 1.22 $
    Author:
    $author$
    • Field Detail

      • secret

        protected java.math.BigInteger secret
      • exchangeHash

        protected byte[] exchangeHash
      • hostKey

        protected byte[] hostKey
      • signature

        protected byte[] signature
    • Constructor Detail

      • SshKeyExchange

        public SshKeyExchange()
        Creates a new SshKeyExchange object.
    • 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()