Package net.schmizz.sshj.transport.kex
Class AbstractDHGex
- java.lang.Object
-
- net.schmizz.sshj.transport.kex.KeyExchangeBase
-
- net.schmizz.sshj.transport.kex.AbstractDH
-
- net.schmizz.sshj.transport.kex.AbstractDHGex
-
- All Implemented Interfaces:
KeyExchange
- Direct Known Subclasses:
DHGexSHA1,DHGexSHA256
public abstract class AbstractDHGex extends AbstractDH
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.Loggerlogprivate intmaxBitsprivate intminBitsprivate intpreferredBits-
Fields inherited from class net.schmizz.sshj.transport.kex.AbstractDH
dh
-
Fields inherited from class net.schmizz.sshj.transport.kex.KeyExchangeBase
digest, H, hostKey, trans
-
-
Constructor Summary
Constructors Constructor Description AbstractDHGex(Digest digest)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinit(Transport trans, java.lang.String V_S, java.lang.String V_C, byte[] I_S, byte[] I_C)Initialize the key exchange algorithm.booleannext(Message msg, SSHPacket buffer)Process the next packetprivate booleanparseGexGroup(SSHPacket buffer)private booleanparseGexReply(SSHPacket buffer)-
Methods inherited from class net.schmizz.sshj.transport.kex.AbstractDH
getK
-
Methods inherited from class net.schmizz.sshj.transport.kex.KeyExchangeBase
getH, getHash, getHostKey, initializedBuffer
-
-
-
-
Field Detail
-
log
private final org.slf4j.Logger log
-
minBits
private final int minBits
- See Also:
- Constant Field Values
-
maxBits
private final int maxBits
- See Also:
- Constant Field Values
-
preferredBits
private final int preferredBits
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractDHGex
public AbstractDHGex(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- Overrides:
initin classKeyExchangeBase- 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
-
next
public boolean next(Message msg, SSHPacket buffer) throws java.security.GeneralSecurityException, TransportException
Description copied from interface:KeyExchangeProcess the next packet- Parameters:
msg- message identifierbuffer- the packet- Returns:
- a boolean indicating if the processing is complete or if more packets are to be received
- Throws:
java.security.GeneralSecurityExceptionTransportException- if there is an error sending a packet
-
parseGexReply
private boolean parseGexReply(SSHPacket buffer) throws Buffer.BufferException, java.security.GeneralSecurityException, TransportException
- Throws:
Buffer.BufferExceptionjava.security.GeneralSecurityExceptionTransportException
-
parseGexGroup
private boolean parseGexGroup(SSHPacket buffer) throws Buffer.BufferException, java.security.GeneralSecurityException, TransportException
- Throws:
Buffer.BufferExceptionjava.security.GeneralSecurityExceptionTransportException
-
-