Package com.trilead.ssh2.crypto.dh
Class DhExchange
- java.lang.Object
-
- com.trilead.ssh2.crypto.dh.DhExchange
-
public class DhExchange extends java.lang.Object
DhExchange.
-
-
Constructor Summary
Constructors Constructor Description DhExchange()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
calculateH(byte[] clientversion, byte[] serverversion, byte[] clientKexPayload, byte[] serverKexPayload, byte[] hostKey)
java.math.BigInteger
getE()
java.math.BigInteger
getK()
void
init(int group, java.security.SecureRandom rnd)
void
setF(java.math.BigInteger f)
-
-
-
Method Detail
-
init
public void init(int group, java.security.SecureRandom rnd)
-
getE
public java.math.BigInteger getE()
- Returns:
- Returns the e.
- Throws:
java.lang.IllegalStateException
-
getK
public java.math.BigInteger getK()
- Returns:
- Returns the shared secret k.
- Throws:
java.lang.IllegalStateException
-
setF
public void setF(java.math.BigInteger f)
- Parameters:
f
-
-
calculateH
public byte[] calculateH(byte[] clientversion, byte[] serverversion, byte[] clientKexPayload, byte[] serverKexPayload, byte[] hostKey) throws java.io.UnsupportedEncodingException
- Throws:
java.io.UnsupportedEncodingException
-
-