Page 1 of 1

MD5 + SHA1 calculator

Posted: 07 Aug 2012 14:40
by 40k
Hi guys,

I do a lot of torrenting and thus find myself often times having to crosscheck check-sums. I used the FCIV command line tool by Microsoft up until now. Until I discovered that XYplorer can do this too. So I wrote a crude script (not a coder at all) that will calculate the MD5 en SHA1 sums for all the files you have currently selected. Results are neatly displayed in a text box.

If you think you can clean up the code please be my guest! Also I attached a screenshot!

Code: Select all

$a = get("SelectedItemsPathNames",|,a);
 $textreport = "";
 foreach($file,$a)
 {
 $checkmd5 = hash("md5",$file,1);
 $checksha1 = hash("sha1",$file,1);
 $hashedfilename = gettoken($file,-1,\);
 $textreport = $textreport . $hashedfilename <crlf>MD5   : . $checkmd5 . <crlf> . "SHA-1 :" . $checksha1 . <crlf> . <crlf>; 
 }
 text $textreport;


Re: MD5 + SHA1 calculator

Posted: 07 Aug 2012 14:55
by highend

Code: Select all

<crlf> . <crlf>

Code: Select all

<crlf 2>
Nothing more to cleanup ;)