using System.Security.Cryptography; using System.Text; public static string getFileHash( string filePath) ... { FileStream fs = new FileStream(filePath, FileMode.Open); MD5 md5 = new MD5CryptoServiceProvider(); byte[] result = md5.ComputeHash(fs); fs.Close(); string sResult = ""; foreach(byte b in result) ...{ sResult += Convert.ToString(b,16); } return sResult;}