mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
support of multiple incoming garlic sessions
This commit is contained in:
6
Garlic.h
6
Garlic.h
@@ -3,7 +3,6 @@
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <cryptopp/modes.h>
|
||||
#include <cryptopp/aes.h>
|
||||
@@ -75,7 +74,7 @@ namespace garlic
|
||||
|
||||
private:
|
||||
|
||||
void HandleAESBlock (uint8_t * buf, size_t len);
|
||||
void HandleAESBlock (uint8_t * buf, size_t len, uint8_t * sessionKey);
|
||||
void HandleGarlicPayload (uint8_t * buf, size_t len);
|
||||
|
||||
private:
|
||||
@@ -83,8 +82,7 @@ namespace garlic
|
||||
// outgoing sessions
|
||||
std::map<i2p::data::IdentHash, GarlicRoutingSession *> m_Sessions;
|
||||
// incoming session
|
||||
uint8_t m_SessionKey[32];
|
||||
std::set<std::string> m_SessionTags;
|
||||
std::map<std::string, std::string> m_SessionTags; // tag -> key
|
||||
CryptoPP::CBC_Mode<CryptoPP::AES>::Decryption m_Decryption;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user