public static string GetFileMD5(string file) { using (var md5 = System.Security.Cryptography.MD5.Create()) using (var stream = File.OpenRead(file)) return BitConverter.ToString(md5.ComputeHash(stream)).Replace("-", "").ToLower(); }