public class GarlicMessageReceiver extends Object
GarlicMessageReceiver.CloveReceiver for dispatch.
This class supports decryption keys of various types including ElGamal, ECIES, and PQ keys,
and performs key selection based on availability.
The receiver can be configured to target a specific client destination, allowing session-key
and tunnel settings to be applied accordingly.| Modifier and Type | Class and Description |
|---|---|
static interface |
GarlicMessageReceiver.CloveReceiver
Interface for handling decrypted garlic cloves.
|
| Constructor and Description |
|---|
GarlicMessageReceiver(RouterContext context,
GarlicMessageReceiver.CloveReceiver receiver)
Constructs a GarlicMessageReceiver without targeting a specific client destination.
|
GarlicMessageReceiver(RouterContext context,
GarlicMessageReceiver.CloveReceiver receiver,
Hash clientDestination)
Constructs a GarlicMessageReceiver targeting a specific client destination.
|
| Modifier and Type | Method and Description |
|---|---|
void |
receive(GarlicMessage message)
Processes a received GarlicMessage by attempting to decrypt it with the appropriate keys.
|
public GarlicMessageReceiver(RouterContext context, GarlicMessageReceiver.CloveReceiver receiver)
context - The router context containing necessary services.receiver - The non-null CloveReceiver to handle valid cloves.public GarlicMessageReceiver(RouterContext context, GarlicMessageReceiver.CloveReceiver receiver, Hash clientDestination)
context - The router context containing necessary services.receiver - The non-null CloveReceiver to handle valid cloves.clientDestination - The client destination hash this receiver targets, or null to target self.public void receive(GarlicMessage message)
message - The incoming GarlicMessage to be processed.