Package com.trilead.ssh2
Class DHGexParameters
- java.lang.Object
-
- com.trilead.ssh2.DHGexParameters
-
public class DHGexParameters extends java.lang.Object
ADHGexParameters
object can be used to specify parameters for the diffie-hellman group exchange.Depending on which constructor is used, either the use of a
SSH_MSG_KEX_DH_GEX_REQUEST
orSSH_MSG_KEX_DH_GEX_REQUEST_OLD
can be forced.- Version:
- $Id: DHGexParameters.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $
- See Also:
Connection.setDHGexParameters(DHGexParameters)
-
-
Field Summary
Fields Modifier and Type Field Description private static int
MAX_ALLOWED
private int
max_group_len
private static int
MIN_ALLOWED
private int
min_group_len
private int
pref_group_len
-
Constructor Summary
Constructors Constructor Description DHGexParameters()
Same as callingDHGexParameters(1024, 2048, 4096)
.DHGexParameters(int pref_group_len)
This constructor can be used to force the sending of aSSH_MSG_KEX_DH_GEX_REQUEST_OLD
request.DHGexParameters(int min_group_len, int pref_group_len, int max_group_len)
This constructor can be used to force the sending of aSSH_MSG_KEX_DH_GEX_REQUEST
request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getMax_group_len()
Get the maximum group length.int
getMin_group_len()
Get the minimum group length.int
getPref_group_len()
Get the preferred group length.
-
-
-
Field Detail
-
min_group_len
private final int min_group_len
-
pref_group_len
private final int pref_group_len
-
max_group_len
private final int max_group_len
-
MIN_ALLOWED
private static final int MIN_ALLOWED
- See Also:
- Constant Field Values
-
MAX_ALLOWED
private static final int MAX_ALLOWED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DHGexParameters
public DHGexParameters()
Same as callingDHGexParameters(1024, 2048, 4096)
. This is also the default used by the Connection class.
-
DHGexParameters
public DHGexParameters(int pref_group_len)
This constructor can be used to force the sending of aSSH_MSG_KEX_DH_GEX_REQUEST_OLD
request. Internally, the minimum and maximum group lengths will be set to zero.- Parameters:
pref_group_len
- has to be >= 1024 and <= 8192
-
DHGexParameters
public DHGexParameters(int min_group_len, int pref_group_len, int max_group_len)
This constructor can be used to force the sending of aSSH_MSG_KEX_DH_GEX_REQUEST
request.Note: older OpenSSH servers don't understand this request, in which case you should use the
DHGexParameters(int)
constructor.All values have to be >= 1024 and <= 8192. Furthermore, min_group_len <= pref_group_len <= max_group_len.
- Parameters:
min_group_len
- min_group_lenpref_group_len
- pref_group_lenmax_group_len
- max_group_len
-
-
Method Detail
-
getMax_group_len
public int getMax_group_len()
Get the maximum group length.- Returns:
- the maximum group length, may be
zero
if SSH_MSG_KEX_DH_GEX_REQUEST_OLD should be requested
-
getMin_group_len
public int getMin_group_len()
Get the minimum group length.- Returns:
- minimum group length, may be
zero
if SSH_MSG_KEX_DH_GEX_REQUEST_OLD should be requested
-
getPref_group_len
public int getPref_group_len()
Get the preferred group length.- Returns:
- the preferred group length
-
-