class HopProcessor extends Object
| Modifier and Type | Field and Description |
|---|---|
protected HopConfig |
_config |
protected I2PAppContext |
_context |
(package private) static int |
IV_LENGTH
as of i2p 0.6, the tunnel crypto changed to encrypt the IV both before
and after using it at each hop so as to prevent a certain type of replay/confirmation
attack.
|
| Constructor and Description |
|---|
HopProcessor(I2PAppContext ctx,
HopConfig config,
IVValidator validator) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
process(byte[] orig,
int offset,
int length,
Hash prev)
Process the data for the current hop, overwriting the original data with
what should be sent to the next peer.
|
String |
toString() |
protected final HopConfig _config
protected final I2PAppContext _context
static final int IV_LENGTH
public HopProcessor(I2PAppContext ctx, HopConfig config, IVValidator validator)
public boolean process(byte[] orig,
int offset,
int length,
Hash prev)
orig - IV+data of the messageoffset - index into orig where the IV beginslength - how long after the offset does the IV+message go for?
Should always be 1024 bytes.prev - previous hop in the tunnel, or null if we are the gateway