| 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 | { |
no test coverage detected