Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.i2p.router.tunnel
Class OutboundGatewayProcessor

    java.lang.Object
      net.i2p.router.tunnel.OutboundGatewayProcessor

    public class OutboundGatewayProcessor

extends Object

Turn the preprocessed tunnel data into something that can be delivered to the first hop in the tunnel. The crypto used in this class is also used by the InboundEndpointProcessor, as its the same 'undo' function of the tunnel crypto.

Field Summary
`(package private) static boolean` | `USE_ENCRYPTION`

Constructor Summary
`OutboundGatewayProcessor(I2PAppContext ctx, TunnelCreatorConfig cfg)`

Method Summary
`(package private) static void` | `decrypt(I2PAppContext ctx, byte[] iv, byte[] orig, int offset, int length, byte[] cur, HopConfig config)` Undo the crypto for a single hop.
`void` | `process(byte[] orig, int offset, int length)` Since we are the outbound gateway, pick a random IV and wrap the preprocessed data so that it will be exposed at the endpoint.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### USE_ENCRYPTION

    static final boolean USE_ENCRYPTION

See Also:
  Constant Field Values

Constructor Detail

### OutboundGatewayProcessor

    public OutboundGatewayProcessor(I2PAppContext ctx,
                                    TunnelCreatorConfig cfg)

Method Detail

### process

    public void process(byte[] orig,
                        int offset,
                        int length)

  Since we are the outbound gateway, pick a random IV and wrap the preprocessed data so that it will be exposed at the endpoint.

  Parameters:
    `orig` - original data with an extra 16 byte IV prepended.
    `offset` - index into the array where the extra 16 bytes (IV) begins
    `length` - how much of orig can we write to (must be a multiple of 16).

### decrypt

    static void decrypt(I2PAppContext ctx,
                        byte[] iv,
                        byte[] orig,
                        int offset,
                        int length,
                        byte[] cur,
                        HopConfig config)

  Undo the crypto for a single hop. This is used by both the outbound gateway (preemptively undoing the crypto peers will add) and by the inbound endpoint.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD