MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / UpdateNTCP2Keys

Method UpdateNTCP2Keys

libi2pd/RouterContext.cpp:460–473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458 }
459
460 void RouterContext::UpdateNTCP2Keys ()
461 {
462 if (!m_NTCP2Keys) return;
463 auto addresses = m_RouterInfo.GetAddresses ();
464 if (!addresses) return;
465 for (auto& it: *addresses)
466 {
467 if (it && it->IsNTCP2 ())
468 {
469 it->s = m_NTCP2Keys->staticPublicKey;
470 memcpy (it->i, m_NTCP2Keys->iv, 16);
471 }
472 }
473 }
474
475 void RouterContext::PublishSSU2Address (int port, bool publish, bool v4, bool v6, int version)
476 {

Callers

nothing calls this directly

Calls 2

GetAddressesMethod · 0.80
IsNTCP2Method · 0.45

Tested by

no test coverage detected