mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-16 20:31:47 +02:00
fill clear text buffer of BuildRequestRecord
This commit is contained in:
parent
7a387b9a9f
commit
ecf709cbba
4 changed files with 46 additions and 11 deletions
|
@ -314,7 +314,13 @@ namespace i2p
|
|||
{
|
||||
router.GetElGamalEncryption ()->Encrypt ((uint8_t *)&clearText, sizeof(clearText), record + BUILD_REQUEST_RECORD_ENCRYPTED_OFFSET);
|
||||
memcpy (record + BUILD_REQUEST_RECORD_TO_PEER_OFFSET, (const uint8_t *)router.GetIdentHash (), 16);
|
||||
}
|
||||
}
|
||||
|
||||
void EncryptBuildRequestRecord (const i2p::data::RouterInfo& router, const uint8_t * clearText, uint8_t * record)
|
||||
{
|
||||
router.GetElGamalEncryption ()->Encrypt (clearText, BUILD_REQUEST_RECORD_CLEAR_TEXT_SIZE, record + BUILD_REQUEST_RECORD_ENCRYPTED_OFFSET);
|
||||
memcpy (record + BUILD_REQUEST_RECORD_TO_PEER_OFFSET, (const uint8_t *)router.GetIdentHash (), 16);
|
||||
}
|
||||
|
||||
bool HandleBuildRequestRecords (int num, uint8_t * records, I2NPBuildRequestRecordClearText& clearText)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue