Advertisement
AnarchyOnline

Hash.xys 0.4

Jun 7th, 2013
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.74 KB | None | 0 0
  1. "Sort by file"
  2.  {
  3.  $Files = get('SelectedItemsPathNames', '|', 'a');
  4.  $Report = '';
  5.  
  6.  global $g_Sha1;
  7.  global $g_Md5;
  8.  global $g_Crc;
  9.  
  10.  foreach($File, $Files)
  11.  {
  12.  $Name = getpathcomponent($File , 'file', );
  13.  $Size = report('{Size B}', $File, , );
  14.  
  15.  $g_Crc = hash('crc32', $File, '1');
  16.  $g_Md5 = hash('md5', $File, '1');
  17.  $g_Sha1 = hash('sha1', $File, '1');
  18.  
  19.  $Report = $Report."$Name<crlf>----------------------------------------<crlf>Size: $Size Bytes<crlf>CRC : $g_Crc<crlf>MD5 : $g_Md5<crlf>SHA : $g_Sha1<crlf 2>";
  20.  }
  21.  
  22.  text $Report;
  23.  }
  24.  
  25. "Sort by algorythm"
  26.  {
  27.  $Files = get('SelectedItemsPathNames', '|', 'a');
  28.  $Report = '';
  29.  
  30.  global $g_Sha1;
  31.  global $g_Md5;
  32.  global $g_Crc;
  33.  
  34.  /*
  35.   * Hash: SHA1
  36.   */
  37.  $Report = "---------------Hash: SHA1---------------<crlf>";
  38.  foreach($File, $Files)
  39.  {
  40.  $Name = getpathcomponent($File , 'file', );
  41.  $Size = report('{Size B}', $File, , );
  42.  $g_Sha1 = hash('sha1', $File, '1');
  43.  $Report = "$Report$g_Sha1 $Name <crlf>";
  44.  }
  45.  $Report = "$Report<crlf>";
  46.  
  47.   /*
  48.    * Hash: MD5
  49.    */
  50.  $Report = "$Report---------------Hash:  MD5---------------<crlf>" ;
  51.  foreach($File,$Files)
  52.  {
  53.  $Name = getpathcomponent($File , 'file', );
  54.  $Size = report('{Size B}', $File, , );
  55.  $g_Md5 = hash('md5', $File, '1');
  56.  $Report = "$Report$g_Md5         $Name <crlf>";
  57.  }
  58.  $Report = "$Report<crlf>";
  59.  
  60.   /*
  61.    * Hash: CRC32
  62.    */
  63.  $Report = "$Report---------------Hash:  CRC---------------<crlf>" ;
  64.  foreach($File,$Files)
  65.  {
  66.  $Name = getpathcomponent($File , 'file', );
  67.  $Size = report('{Size B}', $File, , );
  68.  $g_Crc = hash('crc32', $File, '1');
  69.  $Report = "$Report$g_Crc                                 $Name <crlf>";
  70.  }
  71.  
  72.  $Report = "$Report<crlf>";
  73.  text ($Report, '1000', '500', , , );
  74.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement