LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

crc32 of a binary file


@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...

0 Kudos
Message 11 of 18
(1,251 Views)

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.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 12 of 18
(1,239 Views)

Hopefully the original poster already found an answer to their question, considering their post was from 2009...

0 Kudos
Message 13 of 18
(1,235 Views)

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.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 14 of 18
(1,231 Views)

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.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 15 of 18
(1,221 Views)

@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.

0 Kudos
Message 16 of 18
(1,211 Views)

You can always do the google search for someone else.

http://www.lmgtfy.com/?q=crc32+of+a+binary+file

0 Kudos
Message 17 of 18
(1,205 Views)

@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).

0 Kudos
Message 18 of 18
(1,201 Views)