mirror of
https://github.com/LNH-team/pico-loader.git
synced 2026-06-02 09:16:49 +02:00
Initial commit
This commit is contained in:
22
arm7/source/loader/TwlAes.h
Normal file
22
arm7/source/loader/TwlAes.h
Normal 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;
|
||||
};
|
||||
Reference in New Issue
Block a user