Releases are available on GitHub.
LibHac is a .NET Framework and .NET Core library for reading and editing file formats used by the Nintendo Switch.
Supported formats
Additional features
Hactoolnet is a tool that uses LibHac for viewing and extracting data from common Nintendo Switch file formats. It partially mimics hactool's interface.
Features
Download
v0.2.0
A single-exe version of hactoolnet has been added to the downloads for convenience over using an exe with dlls
LibHac
LibHac is a .NET Framework and .NET Core library for reading and editing file formats used by the Nintendo Switch.
Supported formats
- NCA
- XCI
- NAX0
- PFS0/HFS0/NSP
- RomFS
- Save file
- Package1
- Package2
- INI1/KIP1
- CNMT
- NACP
- Ticket
- PRODINFO
- Switch NAND and SD card
Additional features
- Save file editing and signing
- PFS0 creation
- Switch key derivation
- Integrity verification of NCA, XCI, etc.
- Personalized title key reading
- Read, parse and display information about a Switch NAND or SD card
- Extract NCA, RomFS and other formats directly from an SD card or NAND, including patched titles
- And more!
hactoolnet
Hactoolnet is a tool that uses LibHac for viewing and extracting data from common Nintendo Switch file formats. It partially mimics hactool's interface.
Features
- Dump the container formats that LibHac supports
- A progress bar!
- Save file signing
- Dump RomFS directly from an XCI or SD card
- Dump SD card titles as NSP files
- Verify the integrity of all titles on a Switch SD card
- Switch key derivation
- Automatic integrity verification of NCA, XCI, etc.
- Give information about the titles and applications on a Switch NAND or SD card
- Extract NCA, RomFS and other formats directly from an SD card or NAND, including patched titles
Download
Changelog
v0.2.0
A single-exe version of hactoolnet has been added to the downloads for convenience over using an exe with dlls
- Use a new `IStorage` interface throughout the library instead of `Stream`
- This interface is more similar to the `IStorage` interface used by Horizon.
- Instead of having a Stream that keeps track of the current position, IStorage accepts an offset, buffer, and length when reading or writing.
- Unlike a Stream, an IStorage instance can be shared between multiple consumers without issue
- `Stream.AsStorage()` and `IStorage.AsStream()` methods are provided for switching between `Stream` and `IStorage`
- Improve AES-XTS performance by ~16x
- Improve AES-CTR performance by 2x
- Add AES-XTS tests
- Add benchmarks for AES-XTS and AES-CTR
- Ability to open a decrypted IStorage of an NCA, Package1 or Package2
- Validate NCA, NPDM and package2 signatures
- Add NPDM parsing support
- Allow more disposal methods to cascade down to the base storage
- Support writing version 5 of `JournalStorage` used in newer save data files
- Fix a fatal save allocation table bug that would occur if the last block of the save data FS was read
- Add a build script
hactoolnet changes
- Add the ability to replace files in a save data file (Currently the new file must be the same size as the old file)
- Add benchmarks for AES-XTS and AES-CTR
- Change how Switch FS title info is displayed, and add an option to display info on all NCAs
v0.1.3
- Add basic save file editing. Any files already in the save file can be written to
- Check validity of save files
- Check validity of PFS files
- Check validity of SwitchFS and SD cards
- Check file hashes in HFS archives
- Partial NSO support
- When keys required to decrypt an NCA are missing, throw an exception with information about the missing keys.
- Add more sanity checks when reading an NCA.
- Read only the NCA header when first opening an NCA. This allows for reading of partial NCAs and slightly improves performance when opening an NCA.
- Fix bug in CombinationStream when reading across boundaries
hactoolnet changes
- Add option to verify SwitchFS and SD cards
- Add option to export all keys
- Add PFS0 extraction
- Print more information about save files
Last edited by minibar,