Package com.sshtools.client.components
Class DiffieHellmanGroup
java.lang.Object
com.sshtools.client.SshKeyExchangeClient
com.sshtools.client.components.DiffieHellmanGroup
- All Implemented Interfaces:
Component,SshComponent,SecureComponent,SshKeyExchange<SshClientContext>
- Direct Known Subclasses:
DiffieHellmanGroup14Sha1JCE,DiffieHellmanGroup14Sha256JCE,DiffieHellmanGroup15Sha512JCE,DiffieHellmanGroup16Sha512JCE,DiffieHellmanGroup17Sha512JCE,DiffieHellmanGroup18Sha512JCE,DiffieHellmanGroup1Sha1JCE
Implementation of the required SSH Transport Protocol key exchange method
"diffie-hellman-group14-sha1".
-
Field Summary
Fields inherited from class com.sshtools.client.SshKeyExchangeClient
clientId, clientKexInit, e, exchangeHash, f, firstPacketFollows, hostKey, key, secret, serverId, serverKexInit, signature, transport, useFirstPacket -
Method Summary
Modifier and TypeMethodDescriptionGet the algorithm name for this key exchangevoidinit(SshTransport<SshClientContext> transport, String clientId, String serverId, byte[] clientKexInit, byte[] serverKexInit, SshPrivateKey prvkey, SshPublicKey pubkey, boolean firstPacketFollows, boolean useFirstPacket) booleanisKeyExchangeMessage(int messageid) booleanprocessMessage(byte[] m) Process a key exchange messagevoidtest()Methods inherited from class com.sshtools.client.SshKeyExchangeClient
calculateExchangeHash, getExchangeHash, getHashAlgorithm, getHostKey, getPriority, getSecret, getSecurityLevel, getSignature, hasReceivedNewKeys, hasSentNewKeys, isComplete, reset, setReceivedNewKeys, setSentNewKeys
-
Method Details
-
getAlgorithm
Get the algorithm name for this key exchange- Returns:
- "diffie-hellman-group14-sha1"
-
init
public void init(SshTransport<SshClientContext> transport, String clientId, String serverId, byte[] clientKexInit, byte[] serverKexInit, SshPrivateKey prvkey, SshPublicKey pubkey, boolean firstPacketFollows, boolean useFirstPacket) throws IOException, SshException - Throws:
IOExceptionSshException
-
getProvider
-
processMessage
Description copied from class:SshKeyExchangeClientProcess a key exchange message- Specified by:
processMessagein interfaceSshKeyExchange<SshClientContext>- Specified by:
processMessagein classSshKeyExchangeClient- Returns:
- boolean, indicating whether it has processed the message or not
- Throws:
SshExceptionIOException
-
isKeyExchangeMessage
public boolean isKeyExchangeMessage(int messageid) -
test
- Throws:
IOExceptionSshException
-