📜  c# md5 哈希文件 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:51.891000             🧑  作者: Mango

代码示例1
private static string GetMD5HashFromFile(string fileName)
{
    using (var md5 = MD5.Create())
    {
        using (var stream = File.OpenRead(fileName))
        {
            return BitConverter.ToString(md5.ComputeHash(stream)).Replace("-", string.Empty);
           }
    }
}