|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sshtools.j2ssh.transport.kex.KeyExchangeState
The key exchange state object is synchronized so that a thread can wait for the key exchange to complete (or fail)
Field Summary | |
static int |
COMPLETE
The key exchange completed |
static int |
FAILED
The key exchange failed. |
static int |
IN_PROGRESS
The key exchange is currently in progress |
Constructor Summary | |
KeyExchangeState()
Constructs the KeyExchangeState |
Method Summary | |
byte[] |
getExchangeHash()
Gets the exchange hash output of the key exchange |
java.lang.String |
getFailureReason()
Gets the failure reason |
byte[] |
getHostKey()
Gets the host key supplied by the server during key exchange |
java.math.BigInteger |
getSecret()
Gets the secret value produced during key exchange |
byte[] |
getSignature()
Gets the signature supplied during key exchange |
int |
getState()
Gets the current state of the key exchange |
void |
setComplete(byte[] exchangeHash,
byte[] hostKey,
byte[] signature,
java.math.BigInteger secret)
Sets the key exchange to complete |
void |
setFailed(java.lang.String reason)
Sets the state to failed |
void |
waitForCompletion()
A Thread can call this method to wait for the completetion of key exchange |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int IN_PROGRESS
public static final int COMPLETE
public static final int FAILED
getFailedReason
to examine the
failure reason.
Constructor Detail |
public KeyExchangeState()
Method Detail |
public byte[] getExchangeHash()
public byte[] getHostKey()
public byte[] getSignature()
public int getState()
public java.math.BigInteger getSecret()
public final void setComplete(byte[] exchangeHash, byte[] hostKey, byte[] signature, java.math.BigInteger secret)
exchangeHash
- The hash outputhostKey
- The servers host keysignature
- The signature to verify the host key withsecret
- The secret key exchange valuepublic final void setFailed(java.lang.String reason)
reason
- The reason for failurepublic final void waitForCompletion()
public java.lang.String getFailureReason()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |