Made changes to GenerateCrc32ForData

This commit is contained in:
Chomp
2025-02-09 15:33:05 +00:00
parent abd7f243e8
commit 2b2ae8fa7b
2 changed files with 3 additions and 2 deletions
@@ -43,7 +43,7 @@ public class BundleHashCacheService(
public bool CalculateAndMatchHash(string bundlePath)
{
var fileContents = _fileUtil.ReadFile(bundlePath);
var generatedHash = _hashUtil.GenerateCrc32ForData(fileContents);
var generatedHash = _hashUtil.GenerateMd5ForData(fileContents);
return MatchWithStoredHash(bundlePath, generatedHash);
}
@@ -51,7 +51,7 @@ public class BundleHashCacheService(
public void CalculateAndStoreHash(string bundlePath)
{
var fileContents = _fileUtil.ReadFile(bundlePath);
var generatedHash = _hashUtil.GenerateCrc32ForData(fileContents);
var generatedHash = _hashUtil.GenerateMd5ForData(fileContents);
StoreValue(bundlePath, generatedHash);
}
+1
View File
@@ -64,6 +64,7 @@ public class HashUtil
return GenerateHashForData(HashingAlgorithm.SHA1, data);
}
[Obsolete("Use GenerateMd5ForData instead")]
public string GenerateCrc32ForData(string data)
{
// TODO: Could not find a ms way of doing this.