org.apache.sshd.common
Interface KeyExchange

All Known Implementing Classes:
AbstractDHGClient, AbstractDHGServer, DHG1, DHG1, DHG14, DHG14

public interface KeyExchange

Key exchange algorithm.

Author:
Apache MINA SSHD Project

Method Summary
 byte[] getH()
          Retrieves the computed H parameter
 Digest getHash()
          The message digest used by this key exchange algorithm.
 byte[] getK()
          Retrieves the computed K parameter
 PublicKey getServerKey()
          Retrieves the server's key
 void init(AbstractSession session, byte[] V_S, byte[] V_C, byte[] I_S, byte[] I_C)
          Initialize the key exchange algorithm.
 boolean next(Buffer buffer)
          Process the next packet
 

Method Detail

init

void init(AbstractSession session,
          byte[] V_S,
          byte[] V_C,
          byte[] I_S,
          byte[] I_C)
          throws Exception
Initialize the key exchange algorithm.

Parameters:
session - the session using this algorithm
V_S - the server identification string
V_C - the client identification string
I_S - the server key init packet
I_C - the client key init packet
Throws:
Exception - if an error occurs

next

boolean next(Buffer buffer)
             throws Exception
Process the next packet

Parameters:
buffer - the packet
Returns:
a boolean indicating if the processing is complete or if more packets are to be received
Throws:
Exception - if an error occurs

getHash

Digest getHash()
The message digest used by this key exchange algorithm.

Returns:
the message digest

getH

byte[] getH()
Retrieves the computed H parameter

Returns:

getK

byte[] getK()
Retrieves the computed K parameter

Returns:

getServerKey

PublicKey getServerKey()
Retrieves the server's key



Copyright © 2008-2012 Apache Software Foundation. All Rights Reserved.