Exemple #1
0
        public static byte ComputeOnceOnly(byte[] buffer, int offset, int len)
        {
            var crc = new Crc8();

            crc.Update(buffer, offset, len);
            return(crc.Value);
        }
Exemple #2
0
        public static byte ComputeOnceOnly(byte b)
        {
            var crc = new Crc8();

            crc.Update(b);
            return(crc.Value);
        }
Exemple #3
0
        public static byte ComputeOnceOnly(IEnumerable <byte> span)
        {
            var crc = new Crc8();

            foreach (var b in span)
            {
                crc.Update(b);
            }
            return(crc.Value);
        }