Skip to main content

crc8

Function crc8 

Source
pub fn crc8(bytes: &[u8]) -> u8
Expand description

Compute CRC-8 with the standard initial value (0x00).

There is no separate “HEM init”: EN 302 755 §5.1.7 puts crc8(header) XOR MODE on the wire, so HEM (MODE=1) is the init-0 CRC XOR 1. (A previous revision modelled HEM as init=0xB5 — that value is init-0 propagated through exactly 9 zero bytes and only coincided for 9-byte inputs; do not reintroduce it.)