feat: Add support for encrypted NCSD

Missing version 1 support and seeded crypto but that would be enough for now.
This commit is contained in:
Mary 2023-06-19 23:13:38 +02:00
parent 2e5bc0cb14
commit 86dd7f54f5
8 changed files with 305 additions and 138 deletions

View file

@ -5,6 +5,7 @@
#include <fstream>
#include <optional>
#include <vector>
#include "crypto/aes_engine.hpp"
#include "helpers.hpp"
#include "handles.hpp"
#include "loader/ncsd.hpp"
@ -146,7 +147,7 @@ public:
void* getReadPointer(u32 address);
void* getWritePointer(u32 address);
std::optional<u32> loadELF(std::ifstream& file);
std::optional<NCSD> loadNCSD(const std::filesystem::path& path);
std::optional<NCSD> loadNCSD(Crypto::AESEngine &aesEngine, const std::filesystem::path& path);
u8 read8(u32 vaddr);
u16 read16(u32 vaddr);