mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 03:37:49 +02:00
handle and publish NTCP2 address
This commit is contained in:
parent
2bd7a92d20
commit
706b976a28
4 changed files with 77 additions and 21 deletions
|
@ -37,7 +37,8 @@ namespace i2p
|
|||
|
||||
struct NTCP2PrivateKeys
|
||||
{
|
||||
uint8_t staticKey[32];
|
||||
uint8_t staticPublicKey[32];
|
||||
uint8_t staticPrivateKey[32];
|
||||
uint8_t iv[16];
|
||||
};
|
||||
|
||||
|
@ -58,6 +59,9 @@ namespace i2p
|
|||
return std::shared_ptr<i2p::garlic::GarlicDestination> (this,
|
||||
[](i2p::garlic::GarlicDestination *) {});
|
||||
}
|
||||
const uint8_t * GetNTCP2StaticPublicKey () const { return m_NTCP2Keys ? m_NTCP2Keys->staticPublicKey : nullptr; };
|
||||
const uint8_t * GetNTCP2StaticPrivateKey () const { return m_NTCP2Keys ? m_NTCP2Keys->staticPrivateKey : nullptr; };
|
||||
const uint8_t * GetNTCP2IV () const { return m_NTCP2Keys ? m_NTCP2Keys->iv : nullptr; };
|
||||
|
||||
uint32_t GetUptime () const;
|
||||
uint32_t GetStartupTime () const { return m_StartupTime; };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue