mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
use common context for ElGamal encrypt/decrypt
This commit is contained in:
parent
4bb607f180
commit
c0c157ecef
7 changed files with 27 additions and 19 deletions
8
Garlic.h
8
Garlic.h
|
@ -153,11 +153,12 @@ namespace garlic
|
|||
{
|
||||
public:
|
||||
|
||||
GarlicDestination (): m_NumTags (32) {}; // 32 tags by default
|
||||
GarlicDestination ();
|
||||
~GarlicDestination ();
|
||||
|
||||
void CleanUp ();
|
||||
void SetNumTags (int numTags) { m_NumTags = numTags; };
|
||||
void SetNumTags (int numTags) { m_NumTags = numTags; };
|
||||
BN_CTX * GetBNContext () const { return m_Ctx; };
|
||||
std::shared_ptr<GarlicRoutingSession> GetRoutingSession (std::shared_ptr<const i2p::data::RoutingDestination> destination, bool attachLeaseSet);
|
||||
void CleanupExpiredTags ();
|
||||
void RemoveDeliveryStatusSession (uint32_t msgID);
|
||||
|
@ -188,7 +189,8 @@ namespace garlic
|
|||
void HandleGarlicPayload (uint8_t * buf, size_t len, std::shared_ptr<i2p::tunnel::InboundTunnel> from);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
BN_CTX * m_Ctx;
|
||||
// outgoing sessions
|
||||
int m_NumTags;
|
||||
std::mutex m_SessionsMutex;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue