[DatFiles/] Clean all hash data

This commit is contained in:
Matt Nadareski
2018-02-21 10:29:57 -08:00
parent 13af2442d3
commit bc059f89fc
9 changed files with 69 additions and 69 deletions

View File

@@ -434,12 +434,12 @@ namespace SabreTools.Library.DatFiles
{
Name = reader.GetAttribute("name"),
Size = Utilities.GetSize(reader.GetAttribute("size")),
CRC = reader.GetAttribute("crc")?.ToLowerInvariant(),
MD5 = reader.GetAttribute("md5")?.ToLowerInvariant(),
SHA1 = reader.GetAttribute("sha1")?.ToLowerInvariant(),
SHA256 = reader.GetAttribute("sha256")?.ToLowerInvariant(),
SHA384 = reader.GetAttribute("sha384")?.ToLowerInvariant(),
SHA512 = reader.GetAttribute("sha512")?.ToLowerInvariant(),
CRC = Utilities.CleanHashData(reader.GetAttribute("crc"), Constants.CRCLength),
MD5 = Utilities.CleanHashData(reader.GetAttribute("md5"), Constants.MD5Length),
SHA1 = Utilities.CleanHashData(reader.GetAttribute("sha1"), Constants.SHA1Length),
SHA256 = Utilities.CleanHashData(reader.GetAttribute("sha256"), Constants.SHA256Length),
SHA384 = Utilities.CleanHashData(reader.GetAttribute("sha384"), Constants.SHA384Length),
SHA512 = Utilities.CleanHashData(reader.GetAttribute("sha512"), Constants.SHA512Length),
Offset = reader.GetAttribute("offset"),
// Value = reader.GetAttribute("value");
ItemStatus = Utilities.GetItemStatus(reader.GetAttribute("status")),
@@ -529,11 +529,11 @@ namespace SabreTools.Library.DatFiles
DatItem disk = new Disk
{
Name = reader.GetAttribute("name"),
MD5 = reader.GetAttribute("md5")?.ToLowerInvariant(),
SHA1 = reader.GetAttribute("sha1")?.ToLowerInvariant(),
SHA256 = reader.GetAttribute("sha256")?.ToLowerInvariant(),
SHA384 = reader.GetAttribute("sha384")?.ToLowerInvariant(),
SHA512 = reader.GetAttribute("sha512")?.ToLowerInvariant(),
MD5 = Utilities.CleanHashData(reader.GetAttribute("md5"), Constants.MD5Length),
SHA1 = Utilities.CleanHashData(reader.GetAttribute("sha1"), Constants.SHA1Length),
SHA256 = Utilities.CleanHashData(reader.GetAttribute("sha256"), Constants.SHA256Length),
SHA384 = Utilities.CleanHashData(reader.GetAttribute("sha384"), Constants.SHA384Length),
SHA512 = Utilities.CleanHashData(reader.GetAttribute("sha512"), Constants.SHA512Length),
ItemStatus = Utilities.GetItemStatus(reader.GetAttribute("status")),
Writable = Utilities.GetYesNo(reader.GetAttribute("writable")),