LibHac is a .NET Framework and .NET Core library for reading and editing file formats used by the Nintendo Switch.
The library can be used either from the attacked .nupkg file, or directly from NuGet.
Note: The uploaded file is a .nupkg file renamed to .zip because GBAtemp doesn't like the .nupkg extension.
Supported formats
Additional features
Software using LibHac
The library can be used either from the attacked .nupkg file, or directly from NuGet.
Note: The uploaded file is a .nupkg file renamed to .zip because GBAtemp doesn't like the .nupkg extension.
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
- Read NAND directly from a Switch running memloader
- And more!
Software using LibHac
- hactoolnet - A hactool-like program for dumping common Switch file formats
- Ryujinx - A Nintendo Switch emulator
- SwitchSDTool - Dump NSP files from your Switch's SD card
- SwitchExplorer - A simple GUI-based NCA explorer (also compatible with NSPs and XCIs)
- Change log
- - Use a new IStorage interface throughout the library instead of Stream
- Improve AES-XTS performance by ~16x
- Improve AES-CTR performance by 2x
- Add AES-XTS tests
- Add benchmarks for AES-XTS and AES-CTR
- Add the 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