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