512 was supposed to be 256

This commit is contained in:
dovholuknf
2020-12-03 22:19:11 -05:00
parent 2d33751342
commit d05fb7d7fa
2 changed files with 8 additions and 8 deletions
+6 -6
View File
@@ -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())
+2 -2
View File
@@ -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);
}