mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-06-12 09:06:53 +02:00
eliminated cast to ecnryptted build record
This commit is contained in:
parent
02851d7587
commit
3c5e9ddd4e
3 changed files with 28 additions and 34 deletions
|
@ -44,6 +44,10 @@ namespace i2p
|
|||
// TunnelBuild
|
||||
const size_t TUNNEL_BUILD_RECORD_SIZE = 528;
|
||||
|
||||
// BuildRequestRecordEncrypted
|
||||
const size_t BUILD_REQUEST_RECORD_TO_PEER_OFFSET = 0;
|
||||
const size_t BUILD_REQUEST_RECORD_ENCRYPTED_OFFSET = BUILD_REQUEST_RECORD_TO_PEER_OFFSET + 16;
|
||||
|
||||
// BuildResponseRecord
|
||||
const size_t BUILD_RESPONSE_RECORD_HASH_OFFSET = 0;
|
||||
const size_t BUILD_RESPONSE_RECORD_PADDING_OFFSET = 32;
|
||||
|
@ -68,12 +72,6 @@ namespace i2p
|
|||
uint8_t filler[29];
|
||||
};
|
||||
|
||||
struct I2NPBuildRequestRecordElGamalEncrypted
|
||||
{
|
||||
uint8_t toPeer[16];
|
||||
uint8_t encrypted[512];
|
||||
};
|
||||
|
||||
#pragma pack ()
|
||||
|
||||
enum I2NPMessageType
|
||||
|
@ -215,10 +213,9 @@ namespace tunnel
|
|||
const uint8_t * replyKey, const uint8_t * replyIV, uint32_t nextMessageID,
|
||||
bool isGateway, bool isEndpoint);
|
||||
void EncryptBuildRequestRecord (const i2p::data::RouterInfo& router,
|
||||
const I2NPBuildRequestRecordClearText& clearText,
|
||||
I2NPBuildRequestRecordElGamalEncrypted& record);
|
||||
const I2NPBuildRequestRecordClearText& clearText, uint8_t * record);
|
||||
|
||||
bool HandleBuildRequestRecords (int num, I2NPBuildRequestRecordElGamalEncrypted * records, I2NPBuildRequestRecordClearText& clearText);
|
||||
bool HandleBuildRequestRecords (int num, uint8_t * records, I2NPBuildRequestRecordClearText& clearText);
|
||||
void HandleVariableTunnelBuildMsg (uint32_t replyMsgID, uint8_t * buf, size_t len);
|
||||
void HandleVariableTunnelBuildReplyMsg (uint32_t replyMsgID, uint8_t * buf, size_t len);
|
||||
void HandleTunnelBuildMsg (uint8_t * buf, size_t len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue