java.lang.Object
net.i2p.router.tunnel.HopProcessor
net.i2p.router.tunnel.InboundGatewayProcessor
Override the hop processor to seed the message with a random IV.
Field Summary
Fields inherited from class HopProcessor
_config, _context, IV_LENGTHModifier and TypeFieldDescriptionprotected final HopConfigConfig for this hop, holding the IV and layer keys and the expected previous hop.protected final I2PAppContextRouter or client context, supplying the log and the AES engine.(package private) static final intLength in bytes of the per-hop IV preceding the message data (16).Constructor Summary
ConstructorsConstructorDescriptionInboundGatewayProcessor(I2PAppContext ctx, HopConfig config) Passes the config on with a validator that accepts every message.Method Summary
All MethodsModifier and TypeMethodDescriptionvoidprocess(byte[] orig, int offset, int length) Use the IV given to us as the first 16 bytes, ignore the 'prev' hop, and encrypt the message like every other participant - we are the inbound gateway.Methods inherited from class HopProcessor
process, toString
Constructor Details
InboundGatewayProcessor
Passes the config on with a validator that accepts every message.- Parameters:
ctx- the application context the processor runs underconfig- the hop configuration handed to the superclass
Method Details
process
public void process(byte[] orig, int offset, int length) Use the IV given to us as the first 16 bytes, ignore the 'prev' hop, and encrypt the message like every other participant - we are the inbound gateway.- Parameters:
orig- the buffer holding the message to processoffset- the index within the buffer where the message startslength- the number of bytes to process starting at that offset