public class HopConfig extends Object
Modifier and Type | Field | Description |
---|---|---|
static int |
REPLY_IV_LENGTH |
IV length for
getReplyIV() |
Constructor | Description |
---|---|
HopConfig() |
Modifier and Type | Method | Description |
---|---|---|
(package private) int |
getAndResetRecentMessagesCount() |
This returns the number of processed messages since the last time this was called,
and resets the count.
|
long |
getCreation() |
when was this tunnel created (in ms since the epoch)?
|
long |
getExpiration() |
when does this tunnel expire (in ms since the epoch)?
|
SessionKey |
getIVKey() |
what key should we use to encrypt the preIV before passing it on?
|
SessionKey |
getLayerKey() |
what key should we use to encrypt the layer before passing it on?
|
int |
getProcessedMessagesCount() |
|
Hash |
getReceiveFrom() |
what is the previous peer in the tunnel (null if gateway)
|
TunnelId |
getReceiveTunnel() |
|
byte[] |
getReceiveTunnelId() |
what tunnel ID are we receiving on?
|
int |
getRecentMessagesCount() |
This returns the number of processed messages since
the last time getAndResetRecentMessagesCount() was called.
|
byte[] |
getReplyIV() |
IV used to encrypt the reply sent for the new tunnel creation crypto
|
SessionKey |
getReplyKey() |
key to encrypt the reply sent for the new tunnel creation crypto
|
Hash |
getSendTo() |
what is the next peer in the tunnel (null if endpoint)
|
TunnelId |
getSendTunnel() |
what is the next tunnel we are sending to? (null if endpoint)
|
byte[] |
getSendTunnelId() |
what is the next tunnel ID we are sending to? (null if endpoint)
|
void |
incrementProcessedMessages() |
Take note of a message being pumped through this tunnel.
|
void |
setCreation(long when) |
|
void |
setExpiration(long when) |
|
void |
setIVKey(SessionKey key) |
|
void |
setLayerKey(SessionKey key) |
|
void |
setReceiveFrom(Hash from) |
|
void |
setReceiveTunnelId(byte[] id) |
|
void |
setReceiveTunnelId(TunnelId id) |
|
void |
setReplyIV(byte[] iv) |
IV used to encrypt the reply sent for the new tunnel creation crypto
|
void |
setReplyKey(SessionKey key) |
|
void |
setSendTo(Hash to) |
|
void |
setSendTunnelId(byte[] id) |
|
String |
toString() |
public static final int REPLY_IV_LENGTH
getReplyIV()
public byte[] getReceiveTunnelId()
public TunnelId getReceiveTunnel()
public void setReceiveTunnelId(byte[] id)
public void setReceiveTunnelId(TunnelId id)
public Hash getReceiveFrom()
public void setReceiveFrom(Hash from)
public byte[] getSendTunnelId()
public TunnelId getSendTunnel()
public void setSendTunnelId(byte[] id)
public Hash getSendTo()
public void setSendTo(Hash to)
public SessionKey getLayerKey()
public void setLayerKey(SessionKey key)
public SessionKey getIVKey()
public void setIVKey(SessionKey key)
public SessionKey getReplyKey()
public void setReplyKey(SessionKey key)
public byte[] getReplyIV()
public void setReplyIV(byte[] iv)
IllegalArgumentException
- if not 16 bytespublic long getExpiration()
public void setExpiration(long when)
public long getCreation()
public void setCreation(long when)
public void incrementProcessedMessages()
public int getProcessedMessagesCount()
public int getRecentMessagesCount()
int getAndResetRecentMessagesCount()