Initial commit

This commit is contained in:
Gericom
2025-11-22 11:08:28 +01:00
commit 9cf3ffbfcf
358 changed files with 58350 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
#pragma once
#include <libtwl/aes/aes.h>
#include "ndsHeader.h"
/// @brief Class handling AES crypto for DSi roms.
class TwlAes
{
public:
/// @brief Sets up AES for the DSi rom with the given \p romHeader.
/// @param romHeader The header of the DSi rom to setup AES for.
void SetupAes(const nds_header_twl_t* romHeader) const;
/// @brief Performs modcrypt decryption.
/// @param data The data to decrypt.
/// @param length The length of the data to decrypt.
/// @param iv The AES initialization vector.
void DecryptModuleAes(void* data, u32 length, const aes_u128_t* iv) const;
private:
void SetupModuleKeyXY(const nds_header_twl_t* romHeader) const;
void SetupNandKeyX() const;
};