Package org.apache.sshd.common.kex.dh
Class AbstractDHKeyExchange
- java.lang.Object
-
- org.apache.sshd.common.util.logging.AbstractLoggingBean
-
- org.apache.sshd.common.kex.dh.AbstractDHKeyExchange
-
- All Implemented Interfaces:
KeyExchange
,NamedResource
,SessionContextHolder
,SessionHolder<Session>
- Direct Known Subclasses:
AbstractDHClientKeyExchange
,AbstractDHServerKeyExchange
public abstract class AbstractDHKeyExchange extends AbstractLoggingBean implements KeyExchange
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]
e
protected byte[]
f
protected byte[]
h
protected Digest
hash
protected byte[]
i_c
protected byte[]
i_s
protected byte[]
k
private Session
session
protected byte[]
v_c
protected byte[]
v_s
-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Fields inherited from interface org.apache.sshd.common.kex.KeyExchange
GROUP_KEX_OPCODES_MAP, SIMPLE_KEX_OPCODES_MAP
-
Fields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDHKeyExchange(Session session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getH()
Retrieves the computedh
parameterDigest
getHash()
The message digest used by this key exchange algorithm.byte[]
getK()
Retrieves the computed k parameterSession
getSession()
void
init(byte[] v_s, byte[] v_c, byte[] i_s, byte[] i_c)
Initialize the key exchange algorithm.java.lang.String
toString()
-
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
getSimplifiedLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.sshd.common.kex.KeyExchange
getServerKey, next
-
Methods inherited from interface org.apache.sshd.common.NamedResource
getName
-
Methods inherited from interface org.apache.sshd.common.session.SessionHolder
getSessionContext
-
-
-
-
Constructor Detail
-
AbstractDHKeyExchange
protected AbstractDHKeyExchange(Session session)
-
-
Method Detail
-
init
public void init(byte[] v_s, byte[] v_c, byte[] i_s, byte[] i_c) throws java.lang.Exception
Description copied from interface:KeyExchange
Initialize the key exchange algorithm.- Specified by:
init
in interfaceKeyExchange
- Parameters:
v_s
- the server identification stringv_c
- the client identification stringi_s
- the server key initialization packeti_c
- the client key initialization packet- Throws:
java.lang.Exception
- if an error occurs
-
getSession
public Session getSession()
- Specified by:
getSession
in interfaceSessionHolder<Session>
-
getHash
public Digest getHash()
Description copied from interface:KeyExchange
The message digest used by this key exchange algorithm.- Specified by:
getHash
in interfaceKeyExchange
- Returns:
- the message digest
-
getH
public byte[] getH()
Description copied from interface:KeyExchange
Retrieves the computedh
parameter- Specified by:
getH
in interfaceKeyExchange
- Returns:
- The
h
parameter
-
getK
public byte[] getK()
Description copied from interface:KeyExchange
Retrieves the computed k parameter- Specified by:
getK
in interfaceKeyExchange
- Returns:
- The
k
parameter
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-