PC Review


Reply
 
 
=?Utf-8?B?TWljaGFlbC0tSg==?=
Guest
Posts: n/a
 
      9th Mar 2005
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CRC32 Dudule Microsoft VB .NET 3 30th Aug 2006 10:15 AM
How to get CRC32 of a file? Flash_pll Microsoft C# .NET 2 22nd Apr 2005 04:21 PM
CRC32 Library... Pup-Peroni Microsoft Dot NET 1 8th May 2004 05:26 PM
Re: CRC32 Fergus Cooney Microsoft VB .NET 7 23rd Oct 2003 06:35 PM
Re: CRC32 Herfried K. Wagner [MVP] Microsoft VB .NET 0 22nd Oct 2003 06:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:59 AM.