From f3f1663999acc56fe0cc6406a5351aac506d7913 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 13 Feb 2022 19:41:05 +0000 Subject: [PATCH] use separate hash for previous packet detection --- bridge_master.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bridge_master.py b/bridge_master.py index 498cf33..3a25516 100644 --- a/bridge_master.py +++ b/bridge_master.py @@ -1470,7 +1470,13 @@ class routerOBP(OPENBRIDGE): #pkt_crc = Crc32.calc(_data[4:53]) #_pkt_crc = Crc32.calc(dmrpkt) - _pkt_crc = _hash + + #Use blake2b hash + _h = blake2b(digest_size=16) + _h.update(_data) + _pkt_crc = _h.digest() + + #_pkt_crc = _hash # Match UNIT data, SMS/GPS, and send it to the dst_id if it is in SUB_MAP if _call_type == 'unit' and (_dtype_vseq == 6 or _dtype_vseq == 7 or _dtype_vseq == 8 or ((_stream_id not in self.STATUS) and _dtype_vseq == 3)):