net.i2p.router.message
Class GarlicMessageBuilder

java.lang.Object
  extended by net.i2p.router.message.GarlicMessageBuilder

public class GarlicMessageBuilder
extends java.lang.Object

Build garlic messages based on a GarlicConfig


Constructor Summary
GarlicMessageBuilder()
           
 
Method Summary
static GarlicMessage buildMessage(RouterContext ctx, GarlicConfig config)
           
static GarlicMessage buildMessage(RouterContext ctx, GarlicConfig config, SessionKey wrappedKey, java.util.Set wrappedTags)
           
static GarlicMessage buildMessage(RouterContext ctx, GarlicConfig config, SessionKey wrappedKey, java.util.Set wrappedTags, int numTagsToDeliver)
           
static GarlicMessage buildMessage(RouterContext ctx, GarlicConfig config, SessionKey wrappedKey, java.util.Set wrappedTags, int numTagsToDeliver, boolean forceElGamal)
           
static GarlicMessage buildMessage(RouterContext ctx, GarlicConfig config, SessionKey wrappedKey, java.util.Set wrappedTags, PublicKey target, SessionKey encryptKey, SessionTag encryptTag)
           
static int estimateAvailableTags(RouterContext ctx, PublicKey key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GarlicMessageBuilder

public GarlicMessageBuilder()
Method Detail

estimateAvailableTags

public static int estimateAvailableTags(RouterContext ctx,
                                        PublicKey key)

buildMessage

public static GarlicMessage buildMessage(RouterContext ctx,
                                         GarlicConfig config)

buildMessage

public static GarlicMessage buildMessage(RouterContext ctx,
                                         GarlicConfig config,
                                         SessionKey wrappedKey,
                                         java.util.Set wrappedTags)

buildMessage

public static GarlicMessage buildMessage(RouterContext ctx,
                                         GarlicConfig config,
                                         SessionKey wrappedKey,
                                         java.util.Set wrappedTags,
                                         int numTagsToDeliver)

buildMessage

public static GarlicMessage buildMessage(RouterContext ctx,
                                         GarlicConfig config,
                                         SessionKey wrappedKey,
                                         java.util.Set wrappedTags,
                                         int numTagsToDeliver,
                                         boolean forceElGamal)

buildMessage

public static GarlicMessage buildMessage(RouterContext ctx,
                                         GarlicConfig config,
                                         SessionKey wrappedKey,
                                         java.util.Set wrappedTags,
                                         PublicKey target,
                                         SessionKey encryptKey,
                                         SessionTag encryptTag)
Parameters:
ctx - scope
config - how/what to wrap
wrappedKey - output parameter that will be filled with the sessionKey used
wrappedTags - output parameter that will be filled with the sessionTags used
target - 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 message
encryptTag - sessionTag used to encrypt the current message