(addr string)
| 282 | } |
| 283 | |
| 284 | func (b *TelemetryStore) hashAddrorHostname(addr string) string { |
| 285 | if hashStr, ok := b.hashCache[addr]; ok { |
| 286 | return hashStr |
| 287 | } |
| 288 | |
| 289 | hash := sha256.Sum256([]byte(b.hashSalt + addr)) |
| 290 | hashStr := hex.EncodeToString(hash[:]) |
| 291 | b.hashCache[addr] = hashStr |
| 292 | return hashStr |
| 293 | } |
| 294 | |
| 295 | func addrToFields(addr netip.Addr) *proto.IPFields { |
| 296 | version := int32(4) |
no outgoing calls