Class LowAnonRecipe

java.lang.Object
net.messagevortex.blender.recipes.BlenderRecipe
net.messagevortex.blender.recipes.LowAnonRecipe
All Implemented Interfaces:
Comparable<BlenderRecipe>

public class LowAnonRecipe extends BlenderRecipe
  • Constructor Details

    • LowAnonRecipe

      public LowAnonRecipe(String section)

      Constructor to create low anon recipe.

      This class is required for bootstrapping a new nenber not having sufficient ephemeral identities to use a high anonymity recipe.

      Parameters:
      section - the name of the configuration section to be used
  • Method Details

    • isAppliable

      public boolean isAppliable(Set<IdentityStoreBlock> anonSet)

      Checks if the recipe is applicaable.

      Recipe is applicable if less than four identities are available. For larger anonymisation sets a more secure recipe is assumed to be available.

      Specified by:
      isAppliable in class BlenderRecipe
      Parameters:
      anonSet - the anonymisation set available
      Returns:
      true if recipe may be applied
    • applyRecipe

      public RoutingCombo applyRecipe(Set<IdentityStoreBlock> anonSet, IdentityStoreBlock from, IdentityStoreBlock to) throws IOException
      Description copied from class: BlenderRecipe

      Creates a routing block with the given parameters.

      Specified by:
      applyRecipe in class BlenderRecipe
      Parameters:
      anonSet - the anonymity set to be used
      from - the sending node address
      to - the receiving node address
      Returns:
      the built routing block
      Throws:
      IOException - if a problem arises when creating the block