tidy up the autobot

This commit is contained in:
SpudGunMan
2025-10-22 14:19:52 -07:00
parent c44f9b1bb4
commit d2d9c03bc8

View File

@@ -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."""