mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
one-time aes garlic encryption
This commit is contained in:
parent
e77f625814
commit
750d6fbaed
2 changed files with 26 additions and 9 deletions
6
Garlic.h
6
Garlic.h
|
@ -36,11 +36,13 @@ namespace garlic
|
|||
#pragma pack()
|
||||
|
||||
const int TAGS_EXPIRATION_TIMEOUT = 900; // 15 minutes
|
||||
|
||||
class GarlicRoutingSession
|
||||
{
|
||||
public:
|
||||
|
||||
GarlicRoutingSession (const i2p::data::RoutingDestination& destination, int numTags);
|
||||
GarlicRoutingSession (const i2p::data::RoutingDestination * destination, int numTags);
|
||||
GarlicRoutingSession (const uint8_t * sessionKey, const uint8_t * sessionTag); // one time encryption
|
||||
~GarlicRoutingSession ();
|
||||
I2NPMessage * WrapSingleMessage (I2NPMessage * msg, const I2NPMessage * leaseSet);
|
||||
int GetNextTag () const { return m_NextTag; };
|
||||
|
@ -60,7 +62,7 @@ namespace garlic
|
|||
|
||||
private:
|
||||
|
||||
const i2p::data::RoutingDestination& m_Destination;
|
||||
const i2p::data::RoutingDestination * m_Destination;
|
||||
uint8_t m_SessionKey[32];
|
||||
uint32_t m_FirstMsgID; // first message ID
|
||||
bool m_IsAcknowledged;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue