checksum

Function checksum 

Source
pub fn checksum<T>(data: &[u8]) -> T
where T: Default + From<u8> + Copy, Wrapping<T>: Add<Output = Wrapping<T>>,
Expand description

Type agonostic wrapping checksum function. We typically only use the u32 version, as u16 and u8 values are the same, with the top bytes masked off.