mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
added ShortECIESTunnelHopConfig
This commit is contained in:
@@ -58,8 +58,8 @@ namespace tunnel
|
||||
ECIESTunnelHopConfig (std::shared_ptr<const i2p::data::IdentityEx> r):
|
||||
TunnelHopConfig (r) {};
|
||||
bool IsECIES () const { return true; };
|
||||
void EncryptECIES (std::shared_ptr<i2p::crypto::CryptoKeyEncryptor>& encryptor,
|
||||
const uint8_t * clearText, uint8_t * encrypted, BN_CTX * ctx);
|
||||
void EncryptECIES (const uint8_t * clearText, size_t len, uint8_t * encrypted);
|
||||
bool DecryptECIES (const uint8_t * encrypted, size_t len, uint8_t * clearText);
|
||||
};
|
||||
|
||||
struct LongECIESTunnelHopConfig: public ECIESTunnelHopConfig
|
||||
@@ -69,6 +69,14 @@ namespace tunnel
|
||||
void CreateBuildRequestRecord (uint8_t * record, uint32_t replyMsgID, BN_CTX * ctx);
|
||||
bool DecryptBuildResponseRecord (const uint8_t * encrypted, uint8_t * clearText);
|
||||
};
|
||||
|
||||
struct ShortECIESTunnelHopConfig: public ECIESTunnelHopConfig
|
||||
{
|
||||
ShortECIESTunnelHopConfig (std::shared_ptr<const i2p::data::IdentityEx> r):
|
||||
ECIESTunnelHopConfig (r) {};
|
||||
void CreateBuildRequestRecord (uint8_t * record, uint32_t replyMsgID, BN_CTX * ctx);
|
||||
bool DecryptBuildResponseRecord (const uint8_t * encrypted, uint8_t * clearText);
|
||||
};
|
||||
|
||||
class TunnelConfig
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user