I am wanting to create a utility to create MD5 hashes for files. The purpose is to have the hash to use later to verify the integrity of the file (that it has not been altered). Here is the basic script I came up with? Is this reasonable and appropriate for the task I want to accomplish?
/*
JMP JSL script to open data file as BLOB and calculate MD5 Hash
*/
Names Default To Here( 1 );
// substitute in your directory path and filename as strings below
dirpath = "<directory path>";
// filename
filename = "<filename>";
//load file as text file Blob, and calculate the hexadecimal MD5 Hash
Char To Hex( Blob To Char( Blob MD5( Load Text File( dirpath || filename, blob ) ) ) );
/*
End script
*/