09-11-2018 07:08 AM
@crossrulz wrote:
wiebe@CARYA wrote:
Why not use MD5? There's an OOTB VI for getting a file's MD5... Not technically a CRC, but probably works even better.
In my experience, they work the same as long as your file stays under 4GB (the limit of the CRC32 before getting a repeat answer). It would be interesting to do a performance comparison...
I think MD5 will typically be slower, as the MD5 algorithm is a bit more complex as the typical CRC. The data reading is probably the bottleneck though.
The presence of an OOTB MD5 solution would make the choice easy for me.
If a 32 bit number is required, a CRC on the MD5 might do the trick. Or simply using a subset of the MD5 string...
09-11-2018 03:01 PM - edited 09-11-2018 03:02 PM
Here is code that I use for calculating CRCs. Code for calculating both CRC-16 and CRC-32 is included. The CRC-32 is the same polynomial used for Ethernet traffic.
09-11-2018 03:29 PM
Hopefully the original poster already found an answer to their question, considering their post was from 2009...
09-11-2018 03:32 PM
I realize that. But the recent discussion was discussing MD5 and CRCs and it was mentioned they would use MD5 because a solution existed. I simply provided one for CRCs too.
09-11-2018 05:41 PM
Plus, there was someone who recently came to this thread on a Google search and complained about people suggesting searching Google as a solution. Yet, this person hasn't come back to this thread for help, so apparently Googling WAS a solution.
09-12-2018 03:07 AM - edited 09-12-2018 03:15 AM
@billko wrote:
Plus, there was someone who recently came to this thread on a Google search and complained about people suggesting searching Google as a solution. Yet, this person hasn't come back to this thread for help, so apparently Googling WAS a solution.
Can't figure out who is supposed to "look especially dumb" exactly: the user asking or the one who posts to google? (I'm won't tell who I'd pick):
@Jandy wrote:
Telling a user to search is not useful. And looks especially dumb when it is on a google result. Just don’t post if yo don’t provide an answer.
09-12-2018 06:45 AM
You can always do the google search for someone else.
09-12-2018 08:05 AM
@RavensFan wrote:
You can always do the google search for someone else.
http://www.lmgtfy.com/?q=crc32+of+a+binary+file
That usually doesn't land well either (I tried it).