abstract class BuildMessageGenerator extends Object
| Constructor and Description |
|---|
BuildMessageGenerator() |
| Modifier and Type | Method and Description |
|---|---|
static void |
createRecord(int recordNum,
int hop,
TunnelBuildMessage msg,
TunnelCreatorConfig cfg,
Hash replyRouter,
long replyTunnel,
RouterContext ctx,
PublicKey peerKey,
Properties props)
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)
|
static boolean |
isBlank(TunnelCreatorConfig cfg,
int hop)
Check if a hop should have a blank (random) record.
|
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.
|
public static void createRecord(int recordNum,
int hop,
TunnelBuildMessage msg,
TunnelCreatorConfig cfg,
Hash replyRouter,
long replyTunnel,
RouterContext ctx,
PublicKey peerKey,
Properties props)
recordNum - the record number to place this record inhop - the hop number for this recordmsg - out parameter - the tunnel build message to add the record tocfg - the tunnel creator configurationreplyRouter - the router to reply to (for OBEP), or nullreplyTunnel - the tunnel ID to reply to (for OBEP), or -1ctx - the router contextpeerKey - the public key to encrypt with; if null, record is random dataprops - properties to go in the build record, non-nullIllegalArgumentException - if hop bigger than configpublic static boolean isBlank(TunnelCreatorConfig cfg, int hop)
cfg - the tunnel creator configurationhop - the hop number to checkpublic static void layeredEncrypt(I2PAppContext ctx, TunnelBuildMessage msg, TunnelCreatorConfig cfg, List<Integer> order)
ctx - the I2P application contextmsg - the tunnel build message to encrypt records incfg - the tunnel creator configurationorder - list of hop #s as Integers. For instance, if (order.get(1) is 4), it is peer cfg.getPeer(4)