mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
added ShortECIESTunnelHopConfig
This commit is contained in:
parent
0ae170531e
commit
aace644815
3 changed files with 58 additions and 14 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue