Ejemplo n.º 1
0
        public static uint Compute32(Bitstream stream)
        {
            uint crc = 0xFFFFFFFF;

            while (!stream.Eof)
            {
                byte index = (byte)(((crc) & 0xFF) ^ stream.ReadByte(true));
                crc = (uint)((crc >> 8) ^ table[index]);
            }
            return ~crc;
        }
Ejemplo n.º 2
0
        public static uint Compute32(Bitstream stream)
        {
            uint crc = 0xFFFFFFFF;

            while (!stream.Eof)
            {
                byte index = (byte)(((crc) & 0xFF) ^ stream.ReadByte(true));
                crc = (uint)((crc >> 8) ^ table[index]);
            }
            return(~crc);
        }