mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 03:37:49 +02:00
NTCP2 added
This commit is contained in:
parent
cd0f75106a
commit
86c1984982
6 changed files with 89 additions and 6 deletions
32
libi2pd/NTCP2.h
Normal file
32
libi2pd/NTCP2.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
#ifndef NTCP2_H__
|
||||
#define NTCP2_H__
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <memory>
|
||||
#include "RouterInfo.h"
|
||||
#include "TransportSession.h"
|
||||
|
||||
namespace i2p
|
||||
{
|
||||
namespace transport
|
||||
{
|
||||
class NTCP2Session: public TransportSession, public std::enable_shared_from_this<NTCP2Session>
|
||||
{
|
||||
public:
|
||||
|
||||
NTCP2Session (std::shared_ptr<const i2p::data::RouterInfo> in_RemoteRouter = nullptr); // TODO
|
||||
~NTCP2Session ();
|
||||
|
||||
private:
|
||||
|
||||
void CreateEphemeralKey (uint8_t * pub);
|
||||
void SendSessionRequest (const uint8_t * iv);
|
||||
|
||||
private:
|
||||
|
||||
uint8_t m_ExpandedPrivateKey[64]; // x25519 ephemeral key
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue