Calculate MD5 checksum for a file
It’s very simple using System.Security.Cryptography.MD5: using (var md5 = MD5.Create()) { using (var stream = File.OpenRead(filename)) { return md5.ComputeHash(stream); } } (I believe that actually the MD5 implementation used doesn’t need to be disposed, but I’d probably still do so anyway.) How you compare the results afterwards is up to you; you can convert the … Read more