From d2d9c03bc873c205c33fcdd59d62cb5ab71da982 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 22 Oct 2025 14:19:52 -0700 Subject: [PATCH] tidy up the autobot --- meshtastic/node.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meshtastic/node.py b/meshtastic/node.py index f3b4c47..8f5f440 100644 --- a/meshtastic/node.py +++ b/meshtastic/node.py @@ -21,11 +21,11 @@ from meshtastic.util import ( logger = logging.getLogger(__name__) def xor_hash(data: bytes) -> int: - """Simple XOR hash for demonstration (replace with your actual implementation).""" - h = 0 - for b in data: - h ^= b - return h + """Compute an XOR hash from bytes.""" + result = 0 + for char in data: + result ^= char + return result def generate_hash(name: str, key_bytes: bytes) -> int: """Generate the channel number by hashing the channel name and psk bytes."""