Board index » delphi » CRC32 Checksum

CRC32 Checksum


2005-02-11 10:52:19 PM
delphi249
Hello,
Thanks in advance and your help appreciated.
How CRC32 Checksum works ? I know CRC32 calculate file bytes.
But How I check if the file has been changed or modified.
Is there any freeware CRC32 Checksum
source code for Delphi 7 to let me know if the file has been changed or not.
Thanks again
 
 

Re:CRC32 Checksum

Quote
How CRC32 Checksum works ? I know CRC32 calculate file bytes.
But How I check if the file has been changed or modified.
Is there any freeware CRC32 Checksum
source code for Delphi 7 to let me know if the file has been changed
or not.
CRC32 is a simple hash function commonly used for error detection. For
any file it returns a 32-bit integer, so the value calculated for some
file may be equal to that calculated for a different file. This is a
fundamental problem with hash functions, but with only 32 bits
available this is especially risky.
I would recommend that for comparing files you use a hash function that
returns more bits, like MD5. This makes the chance of a collission much
less likely. CRC32 is IMHO only appropriate for error detection on
small amounts of data.
You will find plenty of MD5 implementations on Google:
www.google.nl/search
 

Re:CRC32 Checksum

Thank you very much
"plharidon" <XXXX@XXXXX.COM>writes

Re:CRC32 Checksum

Hi all
Can someone tell me how to calculate the crc32 value of a file.
Any c++ code would be great.
Thanks
Karsten
 

Re:CRC32 Checksum

"Karsten Becker" <XXXX@XXXXX.COM>writes
Quote
Hi all

Can someone tell me how to calculate the crc32 value of a file.
Any c++ code would be great.
Here you go. Many thanks to Mr Lebeau. tinyurl.com/7qyp7
Jonathan
 

Re:CRC32 Checksum

Look here...
tinyurl.com/az7p6
--
Best regards,
Vladimir Stefanovic
"Karsten Becker" <XXXX@XXXXX.COM>writes
Quote
Hi all

Can someone tell me how to calculate the crc32 value of a file.
Any c++ code would be great.

Thanks
Karsten

 

Re:CRC32 Checksum

You were faster ;)
--
Best regards,
Vladimir Stefanovic
"Jonathan Benedicto" <XXXX@XXXXX.COM>writes
Quote
"Karsten Becker" <XXXX@XXXXX.COM>writes
news:XXXX@XXXXX.COM...
>Hi all
>
>Can someone tell me how to calculate the crc32 value of a file.
>Any c++ code would be great.

Here you go. Many thanks to Mr Lebeau. tinyurl.com/7qyp7

Jonathan

 

Re:CRC32 Checksum

"Vladimir Stefanovic" <XXXX@XXXXX.COM>writes
Quote
You were faster ;)
We both hit one the very same URL. I guess that "great minds think alike".
<g>
Jonathan
 

Re:CRC32 Checksum

Nice !! :)
Thanx guys
"Vladimir Stefanovic" <XXXX@XXXXX.COM>schreef in bericht
Quote
Look here...
tinyurl.com/az7p6


--
Best regards,
Vladimir Stefanovic
"Karsten Becker" <XXXX@XXXXX.COM>writes
news:XXXX@XXXXX.COM...
>Hi all
>
>Can someone tell me how to calculate the crc32 value of a file.
>Any c++ code would be great.
>
>Thanks
>Karsten
>


 

Re:CRC32 Checksum

On Thu, 4 Aug 2005 16:14:40 +0200, "Karsten Becker"
<XXXX@XXXXX.COM>writes:
Quote
Hi all

Can someone tell me how to calculate the crc32 value of a file.
Any c++ code would be great.

Hi Karsten,
boost libraries have a crc section. For example:
#include <boost/crc.hpp>
using boost::crc_32_type;
crc_32_type buffer_crc;
const string buffer = /* fill buffer with data */;
buffer_crc.process_block( buffer.begin(), buffer.end() );
cout << buffer_crc.checksum();
Giuliano