Browse Source

fixed typo

pull/1752/head
orignal 3 years ago
parent
commit
f5f4150d17
  1. 4
      libi2pd/SSU2.cpp

4
libi2pd/SSU2.cpp

@ -294,7 +294,7 @@ namespace transport
htobe16buf (payload + 1, 4); htobe16buf (payload + 1, 4);
htobe32buf (payload + 3, i2p::util::GetSecondsSinceEpoch ()); htobe32buf (payload + 3, i2p::util::GetSecondsSinceEpoch ());
size_t payloadSize = 7; size_t payloadSize = 7;
payloadSize += CreateAddressBlock (m_RemoteEndpoint, payload, 64 - payloadSize); payloadSize += CreateAddressBlock (m_RemoteEndpoint, payload + payloadSize, 64 - payloadSize);
payloadSize += CreatePaddingBlock (payload + payloadSize, 64 - payloadSize); payloadSize += CreatePaddingBlock (payload + payloadSize, 64 - payloadSize);
// KDF for SessionCreated // KDF for SessionCreated
m_NoiseState->MixHash ( { {header.buf, 16}, {headerX, 16} } ); // h = SHA256(h || header) m_NoiseState->MixHash ( { {header.buf, 16}, {headerX, 16} } ); // h = SHA256(h || header)
@ -576,7 +576,7 @@ namespace transport
htobe16buf (payload + 1, 4); htobe16buf (payload + 1, 4);
htobe32buf (payload + 3, i2p::util::GetSecondsSinceEpoch ()); htobe32buf (payload + 3, i2p::util::GetSecondsSinceEpoch ());
size_t payloadSize = 7; size_t payloadSize = 7;
payloadSize += CreateAddressBlock (m_RemoteEndpoint, payload, 64 - payloadSize); payloadSize += CreateAddressBlock (m_RemoteEndpoint, payload + payloadSize, 64 - payloadSize);
payloadSize += CreatePaddingBlock (payload + payloadSize, 64 - payloadSize); payloadSize += CreatePaddingBlock (payload + payloadSize, 64 - payloadSize);
// encrypt // encrypt
const uint8_t nonce[12] = {0}; const uint8_t nonce[12] = {0};

Loading…
Cancel
Save