public static string GetMD5HashFromFile(string fileName)
    byte[] retVal;
    using (var file = new FileStream(fileName, FileMode.Open))
        var md5 = new MD5CryptoServiceProvider();
        retVal = md5.ComputeHash(file);

    var sb = new StringBuilder();
    for (var i = 0; i < retVal.Length; i++)

    return sb.ToString();

Add comment

  • Comment
  • Preview

Created by: X

Just another personal website in this crazy online world

Name of author Dean Lunz (aka Created by: X)
Computer programming nerd, and tech geek.
About Me -- Resume