net.i2p.router.message
public class GarlicMessageBuilder extends Object
Constructor and Description |
---|
GarlicMessageBuilder() |
Modifier and Type | Method and Description |
---|---|
static GarlicMessage |
buildMessage(RouterContext ctx,
GarlicConfig config,
SessionKey wrappedKey,
Set<SessionTag> wrappedTags,
int numTagsToDeliver,
int lowTagsThreshold,
boolean forceElGamal,
SessionKeyManager skm)
called by netdb
|
static GarlicMessage |
buildMessage(RouterContext ctx,
GarlicConfig config,
SessionKey wrappedKey,
Set<SessionTag> wrappedTags,
PublicKey target,
SessionKey encryptKey,
SessionTag encryptTag)
used by TestJob and directly above
|
static GarlicMessage |
buildMessage(RouterContext ctx,
GarlicConfig config,
SessionKey wrappedKey,
Set<SessionTag> wrappedTags,
SessionKeyManager skm)
called by OCMJH
|
static int |
estimateAvailableTags(RouterContext ctx,
PublicKey key,
Hash local) |
public static int estimateAvailableTags(RouterContext ctx, PublicKey key, Hash local)
local
- non-null; do not use this method for the router's SessionKeyManagerpublic static GarlicMessage buildMessage(RouterContext ctx, GarlicConfig config, SessionKey wrappedKey, Set<SessionTag> wrappedTags, SessionKeyManager skm)
ctx
- scopeconfig
- how/what to wrapwrappedKey
- output parameter that will be filled with the sessionKey usedwrappedTags
- output parameter that will be filled with the sessionTags usedskm
- non-nullpublic static GarlicMessage buildMessage(RouterContext ctx, GarlicConfig config, SessionKey wrappedKey, Set<SessionTag> wrappedTags, int numTagsToDeliver, int lowTagsThreshold, boolean forceElGamal, SessionKeyManager skm)
ctx
- scopeconfig
- how/what to wrapwrappedKey
- output parameter that will be filled with the sessionKey usedwrappedTags
- output parameter that will be filled with the sessionTags usednumTagsToDeliver
- only if the estimated available tags are below the thresholdlowTagsThreshold
- the thresholdskm
- non-nullpublic static GarlicMessage buildMessage(RouterContext ctx, GarlicConfig config, SessionKey wrappedKey, Set<SessionTag> wrappedTags, PublicKey target, SessionKey encryptKey, SessionTag encryptTag)
ctx
- scopeconfig
- how/what to wrapwrappedKey
- unused - why??wrappedTags
- output parameter that will be filled with the sessionTags usedtarget
- public key of the location being garlic routed to (may be null if we
know the encryptKey and encryptTag)encryptKey
- sessionKey used to encrypt the current messageencryptTag
- sessionTag used to encrypt the current message