mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
3d50085e22
*Create an IStorage interface and Storage abstract class to use instead of Stream * Improve AES-XTS performance by ~16x * Double AES-CTR performance: 800 MB/s -> 1600 MB/s on a 6700K * Add AES-XTS tests * Add AES benchmark and AES-CTR writing * Add support for a hashed FAT in save files * Add option to export decrypted NCA * Allow opening decrypted package1 and package2 * Make sure romfs disposal can cascade all the way down * Validate NCA, NPDM and package2 signatures
79 lines
1.9 KiB
C#
79 lines
1.9 KiB
C#
using LibHac;
|
|
using LibHac.IO;
|
|
|
|
namespace hactoolnet
|
|
{
|
|
internal class Options
|
|
{
|
|
public bool RunCustom;
|
|
public string InFile;
|
|
public FileType InFileType = FileType.Nca;
|
|
public bool Raw;
|
|
public bool Validate;
|
|
public bool EnableHash;
|
|
public string Keyfile;
|
|
public string TitleKeyFile;
|
|
public string ConsoleKeyFile;
|
|
public string[] SectionOut = new string[4];
|
|
public string[] SectionOutDir = new string[4];
|
|
public string ExefsOut;
|
|
public string ExefsOutDir;
|
|
public string RomfsOut;
|
|
public string RomfsOutDir;
|
|
public string DebugOutDir;
|
|
public string SaveOutDir;
|
|
public string OutDir;
|
|
public string PlaintextOut;
|
|
public string SdSeed;
|
|
public string NspOut;
|
|
public string SdPath;
|
|
public string BaseNca;
|
|
public string RootDir;
|
|
public string UpdateDir;
|
|
public string NormalDir;
|
|
public string SecureDir;
|
|
public string LogoDir;
|
|
public bool ListApps;
|
|
public bool ListTitles;
|
|
public bool ListRomFs;
|
|
public bool ListFiles;
|
|
public bool SignSave;
|
|
public ulong TitleId;
|
|
public string BenchType;
|
|
|
|
public IntegrityCheckLevel IntegrityLevel
|
|
{
|
|
get
|
|
{
|
|
if (Validate) return IntegrityCheckLevel.IgnoreOnInvalid;
|
|
if (EnableHash) return IntegrityCheckLevel.ErrorOnInvalid;
|
|
return IntegrityCheckLevel.None;
|
|
}
|
|
}
|
|
}
|
|
|
|
internal enum FileType
|
|
{
|
|
Nca,
|
|
Pfs0,
|
|
Nsp,
|
|
Romfs,
|
|
Nax0,
|
|
Xci,
|
|
SwitchFs,
|
|
Save,
|
|
Keygen,
|
|
Pk11,
|
|
Pk21,
|
|
Kip1,
|
|
Ini1,
|
|
Bench
|
|
}
|
|
|
|
internal class Context
|
|
{
|
|
public Options Options;
|
|
public Keyset Keyset;
|
|
public IProgressReport Logger;
|
|
}
|
|
}
|