"Tool" naming was annoying me

This commit is contained in:
Matt Nadareski
2026-03-22 00:41:08 -04:00
parent 49e8cf9d7d
commit bdac2d0334
4 changed files with 8 additions and 8 deletions

View File

@@ -7,7 +7,7 @@ using SabreTools.Serialization.Wrappers;
namespace NDecrypt.Core namespace NDecrypt.Core
{ {
public class DSTool : ITool public class DSProcessor : ICartProcessor
{ {
#region Properties #region Properties

View File

@@ -1,6 +1,6 @@
namespace NDecrypt.Core namespace NDecrypt.Core
{ {
public interface ITool public interface ICartProcessor
{ {
/// <summary> /// <summary>
/// Attempts to encrypt an input file /// Attempts to encrypt an input file

View File

@@ -9,7 +9,7 @@ using static SabreTools.Data.Models.N3DS.Constants;
namespace NDecrypt.Core namespace NDecrypt.Core
{ {
public class ThreeDSTool : ITool public class ThreeDSProcessor : ICartProcessor
{ {
/// <summary> /// <summary>
/// AES Hardware Constant /// AES Hardware Constant
@@ -359,7 +359,7 @@ namespace NDecrypt.Core
#endregion #endregion
public ThreeDSTool(bool development) public ThreeDSProcessor(bool development)
{ {
_development = development; _development = development;
} }

View File

@@ -32,7 +32,7 @@ namespace NDecrypt.Features
/// <summary> /// <summary>
/// Mapping of reusable tools /// Mapping of reusable tools
/// </summary> /// </summary>
private readonly Dictionary<FileType, ITool?> _tools = []; private readonly Dictionary<FileType, ICartProcessor?> _tools = [];
protected BaseFeature(string name, string[] flags, string description, string? detailed = null) protected BaseFeature(string name, string[] flags, string description, string? detailed = null)
: base(name, flags, description, detailed) : base(name, flags, description, detailed)
@@ -96,14 +96,14 @@ namespace NDecrypt.Features
return; return;
// Create the DS tool // Create the DS tool
_tools[FileType.NDS] = new DSTool _tools[FileType.NDS] = new DSProcessor
{ {
BlowfishTable = config.NitroEncryptionData.FromHexString() ?? [], BlowfishTable = config.NitroEncryptionData.FromHexString() ?? [],
}; };
// Create the 3DS tool // Create the 3DS tool
bool development = GetBoolean(DevelopmentName); bool development = GetBoolean(DevelopmentName);
_tools[FileType.N3DS] = new ThreeDSTool(development) _tools[FileType.N3DS] = new ThreeDSProcessor(development)
{ {
AESHardwareConstant = config.AESHardwareConstant.FromHexString() ?? [], AESHardwareConstant = config.AESHardwareConstant.FromHexString() ?? [],
KeyX0x18 = config.KeyX0x18.FromHexString() ?? [], KeyX0x18 = config.KeyX0x18.FromHexString() ?? [],
@@ -121,7 +121,7 @@ namespace NDecrypt.Features
/// Derive the encryption tool to be used for the given file /// Derive the encryption tool to be used for the given file
/// </summary> /// </summary>
/// <param name="filename">Filename to derive the tool from</param> /// <param name="filename">Filename to derive the tool from</param>
protected ITool? DeriveTool(string filename) protected ICartProcessor? DeriveTool(string filename)
{ {
if (!File.Exists(filename)) if (!File.Exists(filename))
{ {