handle tunnel delivery instructioin for ECIESx25519

This commit is contained in:
orignal 2020-01-16 12:47:08 -05:00
parent 376bf6ba72
commit bcfe44db54
7 changed files with 72 additions and 47 deletions

View file

@ -24,20 +24,19 @@ namespace garlic
{
public:
typedef std::function<void (uint8_t typeID, const uint8_t * payload, size_t len)> CloveI2NPMsgHandler;
typedef std::function<void (const uint8_t * buf, size_t len)> CloveHandler;
ECIESX25519AEADRatchetSession ();
~ECIESX25519AEADRatchetSession ();
bool NewIncomingSession (const i2p::data::LocalDestination& dest, const uint8_t * buf, size_t len,
CloveI2NPMsgHandler handleCloveI2NPMsg);
CloveHandler handleClove);
private:
void MixHash (const uint8_t * buf, size_t len);
void HandlePayload (const uint8_t * buf, size_t len, CloveI2NPMsgHandler& handleCloveI2NPMsg);
void HandleClove (const uint8_t * buf, size_t len, CloveI2NPMsgHandler& handleCloveI2NPMsg);
void HandlePayload (const uint8_t * buf, size_t len, CloveHandler& handleClove);
private: