mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
support of multiple incoming garlic sessions
This commit is contained in:
parent
991a80428d
commit
ebc6811e71
2 changed files with 12 additions and 12 deletions
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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue