Resource icon

LibHac 0.2.0

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
  • 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
  • Like
Reactions: gnmmarechal
Author
minibar
Downloads
612
Views
1,345
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from minibar

Latest updates

  1. v0.2.0

    A single-exe version of hactoolnet has been added to the downloads for convenience over using an...
General chit-chat
Help Users
  • No one is chatting at the moment.
  • SylverReZ @ SylverReZ:
    @Jayro, I don't see whats so special about the DS ML, its just a DS lite in a phat shell. At least the phat model had louder speakers, whereas the lite has a much better screen.
    +1
  • SylverReZ @ SylverReZ:
    They probably said "Hey, why not we combine the two together and make a 'new' DS to sell".
  • Veho @ Veho:
    It's a DS Lite in a slightly bigger DS Lite shell.
    +1
  • Veho @ Veho:
    It's not a Nintendo / iQue official product, it's a 3rd party custom.
    +1
  • Veho @ Veho:
    Nothing special about it other than it's more comfortable than the Lite
    for people with beefy hands.
    +1
  • Jayro @ Jayro:
    I have yaoi anime hands, very lorge but slender.
  • Jayro @ Jayro:
    I'm Slenderman.
  • Veho @ Veho:
    I have hands.
  • BakerMan @ BakerMan:
    imagine not having hands, cringe
    +1
  • AncientBoi @ AncientBoi:
    ESPECIALLY for things I do to myself :sad:.. :tpi::rofl2: Or others :shy::blush::evil:
    +1
  • The Real Jdbye @ The Real Jdbye:
    @SylverReZ if you could find a v5 DS ML you would have the best of both worlds since the v5 units had the same backlight brightness levels as the DS Lite unlockable with flashme
  • The Real Jdbye @ The Real Jdbye:
    but that's a long shot
  • The Real Jdbye @ The Real Jdbye:
    i think only the red mario kart edition phat was v5
  • BigOnYa @ BigOnYa:
    A woman with no arms and no legs was sitting on a beach. A man comes along and the woman says, "I've never been hugged before." So the man feels bad and hugs her. She says "Well i've also never been kissed before." So he gives her a kiss on the cheek. She says "Well I've also never been fucked before." So the man picks her up, and throws her in the ocean and says "Now you're fucked."
    +2
  • BakerMan @ BakerMan:
    lmao
  • BakerMan @ BakerMan:
    anyways, we need to re-normalize physical media

    if i didn't want my games to be permanent, then i'd rent them
    +1
  • BigOnYa @ BigOnYa:
    Agreed, that why I try to buy all my games on disc, Xbox anyways. Switch games (which I pirate tbh) don't matter much, I stay offline 24/7 anyways.
  • AncientBoi @ AncientBoi:
    I don't pirate them, I Use Them :mellow:. Like I do @BigOnYa 's couch :tpi::evil::rofl2:
    +1
  • cearp @ cearp:
    @BakerMan - you can still "own" digital media, arguably easier and better than physical since you can make copies and backups, as much as you like.

    The issue is DRM
  • cearp @ cearp:
    You can buy drm free games / music / ebooks, and if you keep backups of your data (like documents and family photos etc), then you shouldn't lose the game. but with a disk, your toddler could put it in the toaster and there goes your $60

    :rofl2:
  • cearp @ cearp:
    still, I agree physical media is nice to have. just pointing out the issue is drm
  • rqkaiju2 @ rqkaiju2:
    i like physical media because it actually feels like you own it. thats why i plan on burning music to cds
  • cearp @ cearp:
    It's nice to not have to have a lot of physical things though, saves space
    +1
    cearp @ cearp: It's nice to not have to have a lot of physical things though, saves space +1