mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
use PrivateKeys for RoutingContext
This commit is contained in:
parent
711b4ab9ae
commit
04c9a96fcb
2 changed files with 19 additions and 23 deletions
|
@ -19,8 +19,8 @@ namespace i2p
|
|||
RouterContext ();
|
||||
|
||||
i2p::data::RouterInfo& GetRouterInfo () { return m_RouterInfo; };
|
||||
const uint8_t * GetPrivateKey () const { return m_Keys.privateKey; };
|
||||
const uint8_t * GetSigningPrivateKey () const { return m_Keys.signingPrivateKey; };
|
||||
const uint8_t * GetPrivateKey () const { return m_Keys.GetPrivateKey (); };
|
||||
const uint8_t * GetSigningPrivateKey () const { return m_Keys.GetSigningPrivateKey (); };
|
||||
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; };
|
||||
|
@ -29,9 +29,9 @@ namespace i2p
|
|||
void UpdateAddress (const char * host); // called from SSU
|
||||
|
||||
// implements LocalDestination
|
||||
const i2p::data::IdentityEx& GetIdentity () const { return m_Identity; };
|
||||
const i2p::data::IdentityEx& GetIdentity () const { return m_Keys.GetPublic (); };
|
||||
const uint8_t * GetEncryptionPrivateKey () const { return GetPrivateKey (); };
|
||||
const uint8_t * GetEncryptionPublicKey () const { return m_Keys.publicKey; };
|
||||
const uint8_t * GetEncryptionPublicKey () const { return GetIdentity ().GetStandardIdentity ().publicKey; };
|
||||
void Sign (const uint8_t * buf, int len, uint8_t * signature) const;
|
||||
void SetLeaseSetUpdated () {};
|
||||
|
||||
|
@ -45,9 +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;
|
||||
i2p::data::PrivateKeys m_Keys;
|
||||
CryptoPP::AutoSeededRandomPool m_Rnd;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue