On Sat, Jan 12, 2002 at 03:59:59PM +0100, Niklas Mehner wrote: <> > Either one of the FnpLinkManager should be eleminated (Singleton object > !?! ... since I do not really know, what these are for, I'd be happy if > someone could tell me if this is the right way) or otherwise if the > DiffieHellman class should become a singleton/flyweight.
The LinkManager implementations are abstractions for constructing Link objects (which wrap Connections with encryption/decryption) as well as, in the case of FNP, caches for existing session keys (we allow the old session keys to be restored to new connections). From memory I think the reason there is two of them is that there is that there is one for the node-node interface and one for the client-node interface (I don't think there are any clients that use crypto - but it would be nice to keep it possible so admin messsages can be strongly authenticated.) Maybe the two interfaces could just as well share the same LinkManager, although it seems more logical to keep them seperate (since one would not restore the same session key on a different interface). As for the problem you are observing, I don't really see a strong reason not to just keep it simple and make precalcBuffer and PrecalcBufferFill in DiffieHellman static. -- Oskar Sandberg oskar at freenetproject.org _______________________________________________ Devl mailing list Devl at freenetproject.org http://lists.freenetproject.org/mailman/listinfo/devl
