fix Check SHA256 sum

This commit is contained in:
ChsBuffer
2020-07-30 00:27:21 +08:00
parent 3488e7bbf3
commit 87adf4de1e

View File

@@ -96,9 +96,7 @@ namespace Netch.Utils
{
var SHA256 = SHA256Managed.Create();
var fileStream = File.OpenRead(filePath);
var s = string.Empty;
SHA256.ComputeHash(fileStream).Select(b => s+=b.ToString("x2"));
return s;
return SHA256.ComputeHash(fileStream).Aggregate(string.Empty, (current, b) => current + b.ToString("x2"));
}
catch
{