Hi,
I've written a CRC32 algorithm in C# and i need to use it when sending data
over over a network. The CRC32 algorithm i am using has a poly of 0x04C11DB7,
initial value of 0xFFFFFFFF, and a 'XOR out with' of 0xFFFFFFFF.
I use a test client and server to send data to each other. Say i want to
send 50 bytes of data from the client to the server. The client reserves the
last 4 bytes of the 50 byte packet for the CRC. It calculates the CRC of the
first 46 bytes of the packet and inserts the result in the reserved 4 bytes.
When the server receives this packet, it checks the CRC by CRCing the first
46 bytes and comparing it to the last 4 bytes. I was wondering if it was
possible to CRC the entire 50 bytes - will this return zero? I've tested it,
with different orderings of the last 4 bytes, but i can't get a value of
zero. I just wanted to confirm here.
I used a CRC16 algorithm in a previous project and i recall that CRCing the
entire packet (data + CRC) gave a result of zero... just thought it would be
the same with CRC32. Thanks.
Michael--J.
|