public abstract class SshKeyExchangeClient extends Object implements SshKeyExchange
Abstract representation of an SSH key exchange.
Modifier and Type | Field and Description |
---|---|
protected byte[] |
exchangeHash
The exchange hash produced during key exchange.
|
protected String |
hashAlgorithm |
protected byte[] |
hostKey
The server's host key.
|
protected BigInteger |
secret
The secret value produced during key exchange.
|
protected byte[] |
signature
The signature generated over the exchange hash
|
protected AbstractClientTransport |
transport
The transport protocol for sending/receiving messages
|
Modifier | Constructor and Description |
---|---|
protected |
SshKeyExchangeClient(String hashAlgorithm,
SecurityLevel securityLevel,
int priority) |
Modifier and Type | Method and Description |
---|---|
abstract String |
getAlgorithm()
Get the key exchange algorithm name.
|
byte[] |
getExchangeHash()
Get the output of the key exchange
|
String |
getHashAlgorithm() |
byte[] |
getHostKey()
Get the host key supplied during key exchange.
|
int |
getPriority() |
BigInteger |
getSecret()
Get the secret value produced during key exchange.
|
SecurityLevel |
getSecurityLevel() |
byte[] |
getSignature()
Get the signature produced during key exchange.
|
void |
init(AbstractClientTransport transport,
boolean ignoreFirstPacket)
Initialize the key exchange.
|
abstract boolean |
isKeyExchangeMessage(int messageid) |
abstract void |
performClientExchange(String clientId,
String serverId,
byte[] clientKexInit,
byte[] serverKexInit)
Override to perform the client side key exchange.
|
void |
reset()
Reset the key exchange.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getProvider, test
protected final String hashAlgorithm
protected BigInteger secret
protected byte[] exchangeHash
protected byte[] hostKey
protected byte[] signature
protected AbstractClientTransport transport
protected SshKeyExchangeClient(String hashAlgorithm, SecurityLevel securityLevel, int priority)
public SecurityLevel getSecurityLevel()
getSecurityLevel
in interface SecureComponent
public int getPriority()
getPriority
in interface SecureComponent
public abstract String getAlgorithm()
getAlgorithm
in interface SshComponent
getAlgorithm
in interface SecureComponent
public byte[] getExchangeHash()
public byte[] getHostKey()
public BigInteger getSecret()
public byte[] getSignature()
public String getHashAlgorithm()
getHashAlgorithm
in interface SshKeyExchange
public void init(AbstractClientTransport transport, boolean ignoreFirstPacket)
transport
- IOException
public abstract void performClientExchange(String clientId, String serverId, byte[] clientKexInit, byte[] serverKexInit) throws SshException
clientId
- serverId
- clientKexInit
- serverKexInit
- IOException
SshException
public abstract boolean isKeyExchangeMessage(int messageid)
public void reset()
Copyright © 2024. All rights reserved.