private static void GetFileSHA1HashDemo() { var path = System.IO.Directory.GetCurrentDirectory() + @"\Demo.png"; var sha1 = CryptographyUtils.GetFileSHA1Hash(path); Console.WriteLine(sha1); if (sha1.Equals("3ca789fcc7cd395314e0a7a8f49775bbd3ce334a", StringComparison.CurrentCultureIgnoreCase)) { Console.WriteLine("true"); } }