CRC .NET

  • Thread starter Thread starter Larry
  • Start date Start date
L

Larry

Hello,
Is there a framework class that implements CRC 32 algorithms. I could not
find on msdn, I just want to make sure that I didn't miss it.
If not can anyone explain how CRC32 algorithm can be implemented.

Thank you
 
Larry said:
Is there a framework class that implements CRC 32 algorithms. I could not
find on msdn, I just want to make sure that I didn't miss it.
If not can anyone explain how CRC32 algorithm can be implemented.

There are plenty of sample implementations around on the web, including
ones in C#.

Do a google search for crc32 and C#, and you'll find lots.
 
William Stacey said:
I would use SHA1.ComputeHash(stream).

It depends on what the requirement is. If it's just "a hashing
algorithm" then SHA1 would indeed be a pretty good choice - but there
are other hashes which are cheaper to calculate but still good at
preventing *accidental* corruption (rather than deliberate tampering).
Adler32 is better than CRC32 in this respect, I believe.

However, my guess is that the OP actually needs to work out a CRC32
hash to match something else which is already working out a CRC32
hash...
 
Back
Top