From 87adf4de1e3207869e44bcc39172bc296018a0b2 Mon Sep 17 00:00:00 2001 From: ChsBuffer <33744752+chsbuffer@users.noreply.github.com> Date: Thu, 30 Jul 2020 00:27:21 +0800 Subject: [PATCH] fix Check SHA256 sum --- Netch/Utils/Utils.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Netch/Utils/Utils.cs b/Netch/Utils/Utils.cs index b1b9e792..e84e2455 100644 --- a/Netch/Utils/Utils.cs +++ b/Netch/Utils/Utils.cs @@ -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 {