mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[ALL] Add SHA-256 as a future option for pretty much everything
This commit is contained in:
@@ -11,6 +11,7 @@ namespace SabreTools.Helper.Dats
|
||||
// Disk information
|
||||
protected string _md5;
|
||||
protected string _sha1;
|
||||
protected string _sha256;
|
||||
protected ItemStatus _itemStatus;
|
||||
|
||||
#endregion
|
||||
@@ -28,6 +29,11 @@ namespace SabreTools.Helper.Dats
|
||||
get { return _sha1; }
|
||||
set { _sha1 = value; }
|
||||
}
|
||||
public string SHA256
|
||||
{
|
||||
get { return _sha256; }
|
||||
set { _sha256 = value; }
|
||||
}
|
||||
public ItemStatus ItemStatus
|
||||
{
|
||||
get { return _itemStatus; }
|
||||
@@ -79,6 +85,7 @@ namespace SabreTools.Helper.Dats
|
||||
|
||||
MD5 = this.MD5,
|
||||
SHA1 = this.SHA1,
|
||||
SHA256 = this.SHA256,
|
||||
ItemStatus = this.ItemStatus,
|
||||
};
|
||||
}
|
||||
@@ -106,8 +113,9 @@ namespace SabreTools.Helper.Dats
|
||||
return dupefound;
|
||||
}
|
||||
|
||||
if (((String.IsNullOrEmpty(_md5) || String.IsNullOrEmpty(newOther.MD5)) || this.MD5 == newOther.MD5) &&
|
||||
((String.IsNullOrEmpty(this.SHA1) || String.IsNullOrEmpty(newOther.SHA1)) || this.SHA1 == newOther.SHA1))
|
||||
if (((String.IsNullOrEmpty(_md5) || String.IsNullOrEmpty(newOther.MD5)) || this.MD5 == newOther.MD5)
|
||||
&& ((String.IsNullOrEmpty(this.SHA1) || String.IsNullOrEmpty(newOther.SHA1)) || this.SHA1 == newOther.SHA1)
|
||||
&& ((String.IsNullOrEmpty(this.SHA256) || String.IsNullOrEmpty(newOther.SHA256)) || this.SHA256 == newOther.SHA256))
|
||||
{
|
||||
dupefound = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user