main_46.py 201 B

1234
  1. def pseudonymize_node_name(name):
  2. """Replace Node.Name (detector ID) by a hash with secret key"""
  3. h = hashlib.md5((app.secret_key + name).encode('utf-8'))
  4. return 'node.' + h.hexdigest()[:6]