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

Function CreateRoutingKey

libi2pd/Identity.cpp:867–878  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

865 }
866
867 IdentHash CreateRoutingKey (const IdentHash& ident, bool nextDay)
868 {
869 uint8_t buf[41]; // ident + yyyymmdd
870 memcpy (buf, (const uint8_t *)ident, 32);
871 if (nextDay)
872 i2p::util::GetNextDayDate ((char *)(buf + 32));
873 else
874 i2p::util::GetCurrentDate ((char *)(buf + 32));
875 IdentHash key;
876 SHA256(buf, 40, key);
877 return key;
878 }
879
880 XORMetric operator^(const IdentHash& key1, const IdentHash& key2)
881 {

Callers 4

SaveUpdatedMethod · 0.85
GetClosestFloodfillMethod · 0.85
GetClosestFloodfillsMethod · 0.85

Calls 2

GetNextDayDateFunction · 0.85
GetCurrentDateFunction · 0.85

Tested by

no test coverage detected