using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
const UInt32 poly= 0xEDB88320;
UInt32[] Data = {0x000009E2, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x0000796F, 0x00006FB1, 0x7C887C85};
UInt32 ini = 0x00000036;
UInt32 tmp1, tmp2;
UInt32 crc = ini;
int i = 0;
Console.WriteLine(Data[0]);
while ( i <= Data.Length-1)
{
tmp1 = 0;
tmp2 = crc & poly;
for (int j = 0; j < 31; j++)
{
tmp1 ^= ((tmp2 >> j) & 1);
}
crc = Data[i] ^ ((crc << 1) | tmp1);
i = i + 1;
}
Console.WriteLine(crc.ToString("X2"));
Console.ReadLine();
}
}
}
Friends can tell me where I'm making a mistake
Result : 984D7A99
INIT = 00000036
LENGTH = 0000001F
DATA: E20900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006F790000B16F0000857C887C
CS1=78F2 -> OK
Report to moderator Logged