CRC CheckSum

W

wg

I am looking for code for VB.NET or C# for a CCITTA CRC Checksum using the
table lookup method for speed.. I have found a few CRC-16 examples but they
are in a language I cant seem to figure out. Could someone please help me
with this?

Thanks

wg
 
I

Inge Henriksen

..NET framework don't support 16-bit CRC, if you only want a checksum
algorithm you should perhaps look into MD5, which is supported:
Dim md5 As New System.Security.Cryptography.MD5CryptoServiceProvider()
Dim md5hash As Byte() = md5.ComputeHash(oByteArr)
 
I

Inge Henriksen

These are all 32-bit CRC examples if I am no mistaken, and not 16-bit CRC? I
think WG was looking for 16-bit.
 
D

Dick Grier

Hi,

The table-lookup method is not needed for a 16-bit CRC (IMO). The actual
speed difference between calculating using the actual algorithm and lookup
is VERY small. On the other hand, 32 bit and larger CRCs can benefit by
using a lookup table.

I have only code that uses the algorithm, so unless that's what you decide
to use...

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
www.mabry.com/vbpgser4 to order.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top