mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
extended identity for local destination
This commit is contained in:
parent
9b8460cffa
commit
2bc1ba1a9c
10 changed files with 59 additions and 40 deletions
|
@ -22,14 +22,14 @@ namespace i2p
|
|||
const uint8_t * GetPrivateKey () const { return m_Keys.privateKey; };
|
||||
const uint8_t * GetSigningPrivateKey () const { return m_Keys.signingPrivateKey; };
|
||||
const i2p::data::Identity& GetRouterIdentity () const { return m_RouterInfo.GetRouterIdentity (); };
|
||||
const i2p::data::IdentHash& GetRouterIdentHash () const { return m_RouterInfo.GetIdentHash (); };
|
||||
CryptoPP::RandomNumberGenerator& GetRandomNumberGenerator () { return m_Rnd; };
|
||||
|
||||
void OverrideNTCPAddress (const char * host, int port); // temporary
|
||||
void UpdateAddress (const char * host); // called from SSU
|
||||
|
||||
// implements LocalDestination
|
||||
const i2p::data::IdentHash& GetIdentHash () const { return m_RouterInfo.GetIdentHash (); };
|
||||
const i2p::data::Identity& GetIdentity () const { return GetRouterIdentity (); };
|
||||
const i2p::data::IdentityEx& GetIdentity () const { return m_Identity; };
|
||||
const uint8_t * GetEncryptionPrivateKey () const { return GetPrivateKey (); };
|
||||
const uint8_t * GetEncryptionPublicKey () const { return m_Keys.publicKey; };
|
||||
void Sign (const uint8_t * buf, int len, uint8_t * signature) const;
|
||||
|
@ -45,6 +45,7 @@ namespace i2p
|
|||
private:
|
||||
|
||||
i2p::data::RouterInfo m_RouterInfo;
|
||||
i2p::data::IdentityEx m_Identity; // TODO: move to RI
|
||||
i2p::data::Keys m_Keys;
|
||||
CryptoPP::DSA::PrivateKey m_SigningPrivateKey;
|
||||
CryptoPP::AutoSeededRandomPool m_Rnd;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue