|
-
October 20th, 2002, 05:49 PM
#1
Regarding check sum algos.
i need implementaion for
CRC_16 , CRC_32 and CCITT algorithms in c/c++ (Unix as operating system). I have searched a lot bt still hardly find any.
thanx in advance
omerash...
-
October 21st, 2002, 09:49 AM
#2
check sum algorithms are very simple to implement. Here is the basic idea..
assign crc0 = datain ^ crc[4];
crc[4] <= crc[3];
crc[3] <= crc[2];
crc[2] <= crc[4] ^ crc[1];
crc[1] <= crc[0];
crc[0] <= crc[4] ^ datain;
The patern in which you combine the bits and perform the xor comparisons doesn't matter. What matters is you're consistant if you want the CRC value to be consistant. Likewise two crc values from different utilities are likely not to be the same.
Good luck..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|