Example Code

File Hash Comparator in LabVIEW

Code and Documents

Attachment

Overview:

This example code uses the built-in MD5 hashing functionality in LabVIEW to compare two files.
Description:
A hashing algorithm can be used to quickly compare files by reducing them both to a short, relatively unique number.  For more information on hashing please see this Wikipedia article.  

This program is designed to wait on a user event before comparing the files.  This allows the user to specify the two files while the program is running before clicking the Compare button.  The Compare case is shown below.  It simply takes the two files, calculates the MD5 hash of both and compares them before outputting the results.
Requirements:

  1. LabVIEW 2012 (or compatible)

Steps to Implement or Execute Code:

  1. Run the VI.
  2. Enter the two file paths.
  3. Click Compare button.

Additional Information or References:

Snippit.png

Additional Notes

The source code is originally uploaded in LabVIEW 2009.

An executable version is also attached for those who have the LabVIEW Run-Time Engine.

"**This document has been updated to meet the current required format for the NI Code Exchange.**"

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.