From d05fb7d7fa58e05763cfe5de79e6ff09850ef42c Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Thu, 3 Dec 2020 22:19:11 -0500 Subject: [PATCH] 512 was supposed to be 256 --- ZitiUpdateService/UpdateCheckers.cs | 12 ++++++------ ZitiUpdateService/UpdateService.cs | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ZitiUpdateService/UpdateCheckers.cs b/ZitiUpdateService/UpdateCheckers.cs index 1fbc66a9..bd6890d3 100644 --- a/ZitiUpdateService/UpdateCheckers.cs +++ b/ZitiUpdateService/UpdateCheckers.cs @@ -30,11 +30,11 @@ namespace ZitiUpdateService { webClient.DownloadFile(downloadUrl, dest); Logger.Info("download complete to: {0}", dest); - string sha512dest = Path.Combine(destinationFolder, destinationName + ".sha512"); - string downloadUrlsha512 = downloadUrl + ".sha512"; - Logger.Info("download started for: {0} to {1}", downloadUrlsha512, sha512dest); - webClient.DownloadFile(downloadUrlsha512, sha512dest); - Logger.Info("download complete to: {0}", sha512dest); + string sha256dest = Path.Combine(destinationFolder, destinationName + ".sha256"); + string downloadUrlsha256 = downloadUrl + ".sha256"; + Logger.Info("download started for: {0} to {1}", downloadUrlsha256, sha256dest); + webClient.DownloadFile(downloadUrlsha256, sha256dest); + Logger.Info("download complete to: {0}", sha256dest); } public string FileName() { @@ -98,7 +98,7 @@ namespace ZitiUpdateService { public bool HashIsValid(string destinationFolder, string destinationName) { string dest = Path.Combine(destinationFolder, destinationName); - string shaFile = dest + ".sha512"; + string shaFile = dest + ".sha256"; string hash = File.ReadAllText(shaFile); using (SHA256 hasher = SHA256.Create()) diff --git a/ZitiUpdateService/UpdateService.cs b/ZitiUpdateService/UpdateService.cs index a933df46..c609f48b 100644 --- a/ZitiUpdateService/UpdateService.cs +++ b/ZitiUpdateService/UpdateService.cs @@ -315,9 +315,9 @@ namespace ZitiUpdateService { return; } - string shaFile = fileDestination + ".sha512"; + string shaFile = fileDestination + ".sha256"; if (File.Exists(shaFile)) { - Logger.Debug("hash was valid - removing sha512 file: {0}", shaFile); + Logger.Debug("hash was valid - removing sha256 file: {0}", shaFile); File.Delete(shaFile); }