Made changes to GenerateCrc32ForData
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user