mirror of
https://github.com/SabreTools/NDecrypt.git
synced 2026-07-08 18:06:38 +00:00
"Tool" naming was annoying me
This commit is contained in:
@@ -7,7 +7,7 @@ using SabreTools.Serialization.Wrappers;
|
||||
|
||||
namespace NDecrypt.Core
|
||||
{
|
||||
public class DSTool : ITool
|
||||
public class DSProcessor : ICartProcessor
|
||||
{
|
||||
#region Properties
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace NDecrypt.Core
|
||||
{
|
||||
public interface ITool
|
||||
public interface ICartProcessor
|
||||
{
|
||||
/// <summary>
|
||||
/// Attempts to encrypt an input file
|
||||
@@ -9,7 +9,7 @@ using static SabreTools.Data.Models.N3DS.Constants;
|
||||
|
||||
namespace NDecrypt.Core
|
||||
{
|
||||
public class ThreeDSTool : ITool
|
||||
public class ThreeDSProcessor : ICartProcessor
|
||||
{
|
||||
/// <summary>
|
||||
/// AES Hardware Constant
|
||||
@@ -359,7 +359,7 @@ namespace NDecrypt.Core
|
||||
|
||||
#endregion
|
||||
|
||||
public ThreeDSTool(bool development)
|
||||
public ThreeDSProcessor(bool development)
|
||||
{
|
||||
_development = development;
|
||||
}
|
||||
@@ -32,7 +32,7 @@ namespace NDecrypt.Features
|
||||
/// <summary>
|
||||
/// Mapping of reusable tools
|
||||
/// </summary>
|
||||
private readonly Dictionary<FileType, ITool?> _tools = [];
|
||||
private readonly Dictionary<FileType, ICartProcessor?> _tools = [];
|
||||
|
||||
protected BaseFeature(string name, string[] flags, string description, string? detailed = null)
|
||||
: base(name, flags, description, detailed)
|
||||
@@ -96,14 +96,14 @@ namespace NDecrypt.Features
|
||||
return;
|
||||
|
||||
// Create the DS tool
|
||||
_tools[FileType.NDS] = new DSTool
|
||||
_tools[FileType.NDS] = new DSProcessor
|
||||
{
|
||||
BlowfishTable = config.NitroEncryptionData.FromHexString() ?? [],
|
||||
};
|
||||
|
||||
// Create the 3DS tool
|
||||
bool development = GetBoolean(DevelopmentName);
|
||||
_tools[FileType.N3DS] = new ThreeDSTool(development)
|
||||
_tools[FileType.N3DS] = new ThreeDSProcessor(development)
|
||||
{
|
||||
AESHardwareConstant = config.AESHardwareConstant.FromHexString() ?? [],
|
||||
KeyX0x18 = config.KeyX0x18.FromHexString() ?? [],
|
||||
@@ -121,7 +121,7 @@ namespace NDecrypt.Features
|
||||
/// Derive the encryption tool to be used for the given file
|
||||
/// </summary>
|
||||
/// <param name="filename">Filename to derive the tool from</param>
|
||||
protected ITool? DeriveTool(string filename)
|
||||
protected ICartProcessor? DeriveTool(string filename)
|
||||
{
|
||||
if (!File.Exists(filename))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user