Skip to content

Commit d2d9c03

Browse files
committed
tidy up the autobot
1 parent c44f9b1 commit d2d9c03

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

meshtastic/node.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
logger = logging.getLogger(__name__)
2222

2323
def xor_hash(data: bytes) -> int:
24-
"""Simple XOR hash for demonstration (replace with your actual implementation)."""
25-
h = 0
26-
for b in data:
27-
h ^= b
28-
return h
24+
"""Compute an XOR hash from bytes."""
25+
result = 0
26+
for char in data:
27+
result ^= char
28+
return result
2929

3030
def generate_hash(name: str, key_bytes: bytes) -> int:
3131
"""Generate the channel number by hashing the channel name and psk bytes."""

0 commit comments

Comments
 (0)