LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Darren's Weekly Nugget 05/15/2006

Check out the following VI that ships with LabVIEW 8.0 and later:
 
[LabVIEW]\vi.lib\utility\MD5Checksum.llb\MD5Checksum file.vi
 
This LLB is available for download on the Developer Zone, but I decided to include it in the shipping VIs in LabVIEW 8.0.  It's a great, 100% G-based implementation of the MD5 algorithm for generating checksums.  I've used this VI for a couple of purposes.  One was to do checksum matching on the files generated by an installer versus the depot files used to create the installer.  Another time I used this VI was in a project where I had a pretty complicated parser that was analyzing text files from disk.  When I stored the parsed information from the file, I also stored the file checksum.  The next time I needed to load the files, I compared the stored checksum against the checksum of the current revision of the file on disk.  If they were the same, I used the stored parsed information instead of having to go through the time-consuming process of parsing the file again. 
 
To learn more about the MD5 algorithm, check out http://en.wikipedia.org/wiki/Md5 .
 
-D
P.S. - To give credit where credit is due, one of my colleagues on the LabVIEW team, Steven Harrison, was the original author of this VI.

P.P.S. - Check out past nuggets here.
Message 1 of 5
(8,544 Views)
That's great!  Also, it should be noted that vi.lib\utility\MD5Checksum.llb\MD5Checksum string.vi operates on string data.



Message Edited by Jim Kring on 05-22-2006 12:51 PM

Message 2 of 5
(8,418 Views)
I ran the MD5ChecksumFile.vi and fed it a VI or two as input and saw the MD5 Message-Digest it spit out.  I then fed it a TestStand Seq file and saw the message "This is not a valid LabVIEW file".  Is there a similar tool for files of different types (Mainly .seq files) ?
0 Kudos
Message 3 of 5
(8,029 Views)

You can look at the code, and there is nothing that is sensitive to any part of the filename or filetype.

For me, it works for any filetype. How are you using it?

0 Kudos
Message 4 of 5
(8,024 Views)
I have been using it as a checksum when transferring (chunking) large files via LabVIEW TCP to ensure the files are correctly reassembled on the receiving end.
Joe Gerhardstein
Viasat
Certified LabVIEW Architect
Certified TestStand Developer
Certified Professional Instructor
http://www.viasat.com
0 Kudos
Message 5 of 5
(5,852 Views)