CalculateMD5HashFile() public static method

public static CalculateMD5HashFile ( string fileName ) : string
fileName string
return string
Example #1
0
 /// <summary>
 /// Create an MD5 hash of a file.
 /// This 32 character hash is for file data integrity checks (e.g. a file contents is unchanged).
 /// </summary>
 /// <param name="fileName">The full path to a file to get the hash.</param>
 /// <returns>The 32 character hex MD5 Hash.</returns>
 public static Primitive MD5HashFile(Primitive fileName)
 {
     if (!System.IO.File.Exists(fileName))
     {
         Utilities.OnFileError(Utilities.GetCurrentMethod(), fileName);
         return("");
     }
     return(StringEncryption.CalculateMD5HashFile(fileName));
 }