mirror of
https://github.com/SabreTools/NDecrypt.git
synced 2026-07-08 18:06:38 +00:00
Minor cleanup
This commit is contained in:
@@ -101,6 +101,11 @@ namespace NDecrypt.Core
|
||||
Console.WriteLine("Encryption Method: Key 0x1B");
|
||||
KeyX = development ? args.DevKeyX0x1B : args.KeyX0x1B;
|
||||
break;
|
||||
|
||||
// This should never happen
|
||||
default:
|
||||
Console.WriteLine("Encryption Method: UNSUPPORTED");
|
||||
break;
|
||||
}
|
||||
|
||||
// Set the normal key based on the new KeyX value
|
||||
|
||||
@@ -214,7 +214,7 @@ namespace NDecrypt.Core
|
||||
var cipher = AESCTR.CreateDecryptionCipher(_keysMap[index].NormalKey2C, cart.PlainIV(index));
|
||||
|
||||
// Process the extended header
|
||||
AESCTR.PerformOperation(Constants.CXTExtendedDataHeaderLength, cipher, reader, writer, null);
|
||||
AESCTR.PerformOperation(CXTExtendedDataHeaderLength, cipher, reader, writer, null);
|
||||
|
||||
#if NET6_0_OR_GREATER
|
||||
// In .NET 6.0, this operation is not picked up by the reader, so we have to force it to reload its buffer
|
||||
@@ -639,7 +639,7 @@ namespace NDecrypt.Core
|
||||
var cipher = AESCTR.CreateEncryptionCipher(_keysMap[index].NormalKey2C, cart.PlainIV(index));
|
||||
|
||||
// Process the extended header
|
||||
AESCTR.PerformOperation(Constants.CXTExtendedDataHeaderLength, cipher, reader, writer, null);
|
||||
AESCTR.PerformOperation(CXTExtendedDataHeaderLength, cipher, reader, writer, null);
|
||||
|
||||
#if NET6_0_OR_GREATER
|
||||
// In .NET 6.0, this operation is not picked up by the reader, so we have to force it to reload its buffer
|
||||
|
||||
@@ -105,6 +105,10 @@ namespace NDecrypt.Features
|
||||
FileType.NDSi => _tools[FileType.NDS],
|
||||
FileType.iQueDS => _tools[FileType.NDS],
|
||||
FileType.N3DS => _tools[FileType.N3DS],
|
||||
FileType.iQue3DS => _tools[FileType.N3DS],
|
||||
|
||||
// Invalid cases
|
||||
FileType.NULL => null,
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ using SabreTools.CommandLine.Features;
|
||||
|
||||
namespace NDecrypt
|
||||
{
|
||||
class Program
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user