java.lang.Object
net.i2p.router.tunnel.HopProcessor
net.i2p.router.tunnel.InboundGatewayProcessor

class InboundGatewayProcessorextends HopProcessor
Override the hop processor to seed the message with a random IV.
  • Field Summary

    Fields inherited from class HopProcessor

    _config, _context, IV_LENGTH
    Modifier and Type
    Field
    Description
    protected final HopConfig
    Config for this hop, holding the IV and layer keys and the expected previous hop.
    protected final I2PAppContext
    Router or client context, supplying the log and the AES engine.
    (package private) static final int
    Length in bytes of the per-hop IV preceding the message data (16).
  • Constructor Summary

    Constructors
    Constructor
    Description
    Passes the config on with a validator that accepts every message.
  • Method Summary

    All Methods
    Modifier and Type
    Method
    Description
    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.

    Methods inherited from class HopProcessor

    process, toString
    Modifier and Type
    Method
    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.
    Processor summary for log messages.

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • InboundGatewayProcessor

      public InboundGatewayProcessor(I2PAppContext ctx, HopConfig config)
      Passes the config on with a validator that accepts every message.
      Parameters:
      ctx - the application context the processor runs under
      config - 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 process
      offset - the index within the buffer where the message starts
      length - the number of bytes to process starting at that offset