Package com.trilead.ssh2.crypto.dh

# Class DhGroupExchange

java.lang.Object
com.trilead.ssh2.crypto.dh.DhGroupExchange

public class DhGroupExchange extends Object
DhGroupExchange.

## Constructor Summary

Constructors
Constructor
Description
`DhGroupExchange(BigInteger p, BigInteger g)`

## Method Summary

Modifier and Type
Method
Description
`byte[]`
`calculateH(byte[] clientversion, byte[] serverversion, byte[] clientKexPayload, byte[] serverKexPayload, byte[] hostKey, DHGexParameters para)`
`BigInteger`
`getE()`
`BigInteger`
`getK()`
`void`
`init(SecureRandom rnd)`
`void`
`setF(BigInteger f)`
Sets f and calculates the shared secret.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DhGroupExchange

public DhGroupExchange(BigInteger p, BigInteger g)

## Method Details

### init

public void init(SecureRandom rnd)

### getE

public BigInteger getE()

Returns:
  Returns the e.

### getK

public BigInteger getK()

Returns:
  Returns the shared secret k.

### setF

public void setF(BigInteger f)
Sets f and calculates the shared secret.

### calculateH

public byte[] calculateH(byte[] clientversion, byte[] serverversion, byte[] clientKexPayload, byte[] serverKexPayload, byte[] hostKey, DHGexParameters para)