internal static string CheckHash(FileInfo info)
{
#if SHOW_HASHES
Printer.PrintDiagnostics("Hashing: {0}", info.FullName);
#endif
using (var hasher = System.Security.Cryptography.SHA1.Create())
using (var fs = info.OpenRead())
{
byte[] hashBytes = hasher.ComputeHash(fs);
string hashValue = string.Empty;
foreach (var h in hashBytes)
hashValue += string.Format("{0:X2}", h);
return hashValue;
}
}
}