Class BuildMessageGenerator

java.lang.Object
net.i2p.router.tunnel.pool.BuildMessageGenerator

abstract class BuildMessageGenerator
extends Object
Fill in the encrypted BuildRequestRecords in a TunnelBuildMessage
Since:
0.9.51 moved to tunnel.pool package
  • Constructor Details

  • Method Details

    • createRecord

      public static void createRecord​(int recordNum, int hop, TunnelBuildMessage msg, TunnelCreatorConfig cfg, Hash replyRouter, long replyTunnel, RouterContext ctx, PublicKey peerKey)
      Place the asymmetrically encrypted record in the specified record slot, containing the hop's configuration (as well as the reply info, if it is an outbound endpoint)
      Parameters:
      msg - out parameter
      peerKey - Encrypt using this key. If null, replyRouter and replyTunnel are ignored, and the entire record is filled with random data
      Throws:
      IllegalArgumentException - if hop bigger than config
    • layeredEncrypt

      public static void layeredEncrypt​(I2PAppContext ctx, TunnelBuildMessage msg, TunnelCreatorConfig cfg, List<Integer> order)
      Encrypt the records so their hop ident is visible at the appropriate times. Note that this layer-encrypts the build records for the message in-place. Only call this once for a given message.
      Parameters:
      order - list of hop #s as Integers. For instance, if (order.get(1) is 4), it is peer cfg.getPeer(4)
    • isBlank

      public static boolean isBlank​(TunnelCreatorConfig cfg, int hop)