Use new IO byte array extensions

This commit is contained in:
Matt Nadareski
2024-10-24 00:46:28 -04:00
parent 15dba6fbbd
commit c6109fdf97
11 changed files with 52 additions and 99 deletions

View File

@@ -399,7 +399,7 @@ namespace SabreTools.FileTypes.Archives
Size = extractedsize,
CRC = headercrc,
MD5 = headermd5,
SHA1 = TextHelper.StringToByteArray(Path.GetFileNameWithoutExtension(this.Filename)),
SHA1 = ByteArrayExtensions.StringToByteArray(Path.GetFileNameWithoutExtension(this.Filename)),
Parent = Path.GetFileNameWithoutExtension(this.Filename).ToLowerInvariant(),
};
@@ -446,7 +446,7 @@ namespace SabreTools.FileTypes.Archives
baseFile = GetInfo(inputStream, keepReadOpen: true);
// Get the output file name
string outfile = Path.Combine(outDir, Utilities.GetDepotPath(TextHelper.ByteArrayToString(baseFile.SHA1), Depth) ?? string.Empty);
string outfile = Path.Combine(outDir, Utilities.GetDepotPath(ByteArrayExtensions.ByteArrayToString(baseFile.SHA1), Depth) ?? string.Empty);
// Check to see if the folder needs to be created
if (!Directory.Exists(Path.GetDirectoryName(outfile)))