Package net.schmizz.sshj.transport.kex
Class KeyExchangeBase
java.lang.Object
net.schmizz.sshj.transport.kex.KeyExchangeBase
- All Implemented Interfaces:
KeyExchange
- Direct Known Subclasses:
AbstractDH
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getH()
getHash()
The message digest used by this key exchange algorithm.void
Initialize the key exchange algorithm.protected Buffer.PlainBuffer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.schmizz.sshj.transport.kex.KeyExchange
getK, next
-
Field Details
-
trans
-
digest
-
H
protected byte[] H -
hostKey
-
V_S
-
V_C
-
I_S
private byte[] I_S -
I_C
private byte[] I_C
-
-
Constructor Details
-
KeyExchangeBase
-
-
Method Details
-
init
public void init(Transport trans, String V_S, String V_C, byte[] I_S, byte[] I_C) throws GeneralSecurityException, TransportException Description copied from interface:KeyExchange
Initialize the key exchange algorithm.- Specified by:
init
in interfaceKeyExchange
- Parameters:
trans
- the transportV_S
- the server identification stringV_C
- the client identification stringI_S
- the server key init packetI_C
- the client key init packet- Throws:
GeneralSecurityException
TransportException
- if there is an error sending a packet
-
initializedBuffer
-
getH
public byte[] getH()- Specified by:
getH
in interfaceKeyExchange
- Returns:
- the computed H parameter
-
getHash
Description copied from interface:KeyExchange
The message digest used by this key exchange algorithm.- Specified by:
getHash
in interfaceKeyExchange
- Returns:
- the message digest
-
getHostKey
- Specified by:
getHostKey
in interfaceKeyExchange
- Returns:
- the host key determined from server's response packets
-