class BloomFilterIVValidator extends Object implements IVValidator
| Constructor and Description |
|---|
BloomFilterIVValidator(RouterContext ctx,
int KBps)Construct the validator, selecting filter size based on bandwidth and memory. |
| Modifier and Type | Method and Description |
|---|---|
void | destroy()Stop the decaying filter. |
boolean | receiveIV(byte[] ivData,
int ivOffset,
byte[] payload,
int payloadOffset)receive the IV for the tunnel message, returning true if it is valid,
or false if it has already been used (or is otherwise invalid). |
public BloomFilterIVValidator(RouterContext ctx, int KBps)
ctx - the router contextKBps - share bandwidthpublic void destroy()
public boolean receiveIV(byte[] ivData,
int ivOffset,
byte[] payload,
int payloadOffset)IVValidatorreceiveIV in interface IVValidatorivData - data will not be modifiedivOffset - offset of the IV in the iv arraypayload - will not be modifiedpayloadOffset - offset of the payload in the payload array