Exemple #1
0
        public void CrcAlgorithmDifferentValues()
        {
            byte[] buffer = {
                0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A,
                0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA
            };

            var crc = new CRC32();
            for (int i = 0; i < buffer.Length; i++)
                crc.UpdateCrc(buffer[i]);

            Assert.AreEqual(crc.CRC, 0x8AEE127A);
        }
Exemple #2
0
 public void CrcAlgorithmSameValues()
 {
     var crc = new CRC32();
     crc.UpdateCrc(0x55,10);
     Assert.AreEqual(crc.CRC, 0xA1E07747);
 }