net.i2p.router.networkdb.kademlia
Class MessageWrapper

java.lang.Object
  extended by net.i2p.router.networkdb.kademlia.MessageWrapper

 class MessageWrapper
extends java.lang.Object

Method and class for garlic encrypting outbound netdb traffic, including management of the ElGamal/AES tags

Since:
0.7.10

Nested Class Summary
(package private) static class MessageWrapper.WrappedMessage
          Wrapper so that we can keep track of the key and tags for later notification to the SKM
 
Constructor Summary
MessageWrapper()
           
 
Method Summary
(package private) static MessageWrapper.WrappedMessage wrap(RouterContext ctx, I2NPMessage m, Hash from, RouterInfo to)
          Garlic wrap a message from a client or this router, destined for a router, to hide the contents from the OBEP.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageWrapper

MessageWrapper()
Method Detail

wrap

static MessageWrapper.WrappedMessage wrap(RouterContext ctx,
                                          I2NPMessage m,
                                          Hash from,
                                          RouterInfo to)
Garlic wrap a message from a client or this router, destined for a router, to hide the contents from the OBEP. Caller must call acked() or fail() on the returned object.

Parameters:
from - must be a local client with a session key manager, or null to use the router's session key manager
Returns:
null on encrypt failure