public class DHGEXClient extends AbstractDHClientKeyExchange
KeyExchange.Utils
Modifier and Type | Field and Description |
---|---|
protected AbstractDH |
dh |
protected byte |
expected |
protected DHFactory |
factory |
protected byte[] |
g |
protected int |
max |
protected int |
min |
protected byte[] |
p |
protected int |
prf |
serverKey
e, f, h, hash, i_c, i_s, k, v_c, v_s
log
BY_NAME_COMPARATOR, NAME_EXTRACTOR
Modifier | Constructor and Description |
---|---|
protected |
DHGEXClient(DHFactory factory) |
Modifier and Type | Method and Description |
---|---|
protected AbstractDH |
getDH(BigInteger p,
BigInteger g) |
String |
getName() |
void |
init(Session s,
byte[] v_s,
byte[] v_c,
byte[] i_s,
byte[] i_c)
Initialize the key exchange algorithm.
|
static KeyExchangeFactory |
newFactory(DHFactory delegate) |
boolean |
next(int cmd,
Buffer buffer)
Process the next packet
|
getClientSession, getServerKey
getH, getHash, getK, getSession, toString
protected final DHFactory factory
protected byte expected
protected int min
protected int prf
protected int max
protected AbstractDH dh
protected byte[] p
protected byte[] g
protected DHGEXClient(DHFactory factory)
public final String getName()
public static KeyExchangeFactory newFactory(DHFactory delegate)
public void init(Session s, byte[] v_s, byte[] v_c, byte[] i_s, byte[] i_c) throws Exception
KeyExchange
init
in interface KeyExchange
init
in class AbstractDHClientKeyExchange
s
- the session using this algorithmv_s
- the server identification stringv_c
- the client identification stringi_s
- the server key init packeti_c
- the client key init packetException
- if an error occurspublic boolean next(int cmd, Buffer buffer) throws Exception
KeyExchange
cmd
- the commandbuffer
- the packet contents positioned after the commandException
- if an error occursprotected AbstractDH getDH(BigInteger p, BigInteger g) throws Exception
Exception
Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.