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.voidInitialize the key exchange algorithm.protected Buffer.PlainBufferMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:KeyExchangeInitialize the key exchange algorithm.- Specified by:
initin 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:
GeneralSecurityExceptionTransportException- if there is an error sending a packet
-
initializedBuffer
-
getH
public byte[] getH()- Specified by:
getHin interfaceKeyExchange- Returns:
- the computed H parameter
-
getHash
Description copied from interface:KeyExchangeThe message digest used by this key exchange algorithm.- Specified by:
getHashin interfaceKeyExchange- Returns:
- the message digest
-
getHostKey
- Specified by:
getHostKeyin interfaceKeyExchange- Returns:
- the host key determined from server's response packets
-