The Crc32 invocation method for PHP is as follows
<?php
Echo crc32 ("ABCD");
3675725989
?>
C # 's CRC32 function is implemented as follows
Using System;
Using System.IO;
Using System.Collections;
Using System.Collections.Generic;
Using System.Linq;
Using System.Text;
Using System.Security.Cryptography;
Namespace ConsoleApplication1 {class Crc32cls {static protected ulong[] crc32table;
Generate CRC32 Code table static public void getcrc32table () {ulong CRC;
crc32table = new ulong[256];
int I, J;
for (i = 0; i < 256 i++) {CRC = (ulong) i; for (j = 8; j > 0; j--) {if (CRC & 1) = 1) CRC = (Cr
C >> 1) ^ 0xedb88320;
else CRC >>= 1;
} Crc32table[i] = CRC; }//Gets the CRC32 checksum of the string static public ulong Getcrc32str (string sinputstring) {//
Generate Code table getcrc32table (); byte[] buffer = SysTem. Text.ASCIIEncoding.ASCII.GetBytes (sinputstring);
ULONG value = 0xFFFFFFFF; int len = buffer.
Length; for (int i = 0; i < len; i++) {value = (value >> 8) ^ crc32table[(value & 0xFF)
^ Buffer[i]];
return value ^ 0xFFFFFFFF; } class Program {static void Main (string[] args) {Console.WriteLine (CRC32CLS.G
Etcrc32str ("ABCD")); Print 3675725989}}}