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
public abstract class KeyExchangeBase extends java.lang.Object implements KeyExchange
-
-
Constructor Summary
Constructors Constructor Description KeyExchangeBase(Digest digest)
-
Method Summary
Modifier and Type Method Description byte[]getH()DigestgetHash()The message digest used by this key exchange algorithm.java.security.PublicKeygetHostKey()voidinit(Transport trans, java.lang.String V_S, java.lang.String V_C, byte[] I_S, byte[] I_C)Initialize the key exchange algorithm.protected Buffer.PlainBufferinitializedBuffer()-
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
-
-
-
-
Constructor Detail
-
KeyExchangeBase
public KeyExchangeBase(Digest digest)
-
-
Method Detail
-
init
public void init(Transport trans, java.lang.String V_S, java.lang.String V_C, byte[] I_S, byte[] I_C) throws java.security.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:
java.security.GeneralSecurityExceptionTransportException- if there is an error sending a packet
-
initializedBuffer
protected Buffer.PlainBuffer initializedBuffer()
-
getH
public byte[] getH()
- Specified by:
getHin interfaceKeyExchange- Returns:
- the computed H parameter
-
getHash
public Digest getHash()
Description copied from interface:KeyExchangeThe message digest used by this key exchange algorithm.- Specified by:
getHashin interfaceKeyExchange- Returns:
- the message digest
-
getHostKey
public java.security.PublicKey getHostKey()
- Specified by:
getHostKeyin interfaceKeyExchange- Returns:
- the host key determined from server's response packets
-
-