private static void GetFileMD5HashDemo() { var path = System.IO.Directory.GetCurrentDirectory() + @"\Demo.png"; var md5 = CryptographyUtils.GetFileMD5Hash(path); Console.WriteLine(md5); if (md5.Equals("c7862d93618a4abe90c708a4b0d01ef3", StringComparison.CurrentCultureIgnoreCase)) { Console.WriteLine("true"); } }