Esempio n. 1
0
        public static int CalculateCrc32(byte[] buffer)
        {
            CRC32Calculator cal = new CRC32Calculator();

            cal.SlurpBlock(buffer, 0, buffer.Length);
            return(cal.Crc32Result);
        }
Esempio n. 2
0
        public static int CalculateCrc32(string inputData)
        {
            CRC32Calculator cal = new CRC32Calculator();

            byte[] utf8 = System.Text.Encoding.UTF8.GetBytes(inputData);
            cal.SlurpBlock(utf8, 0, utf8.Length);
            return(cal.Crc32Result);
        }