214 changes: 135 additions & 79 deletions Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.cpp

Large diffs are not rendered by default.

26 changes: 12 additions & 14 deletions Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.h
Expand Up @@ -16,6 +16,11 @@
class CWiiSaveCrypted
{
public:
bool static ImportWiiSave(const char* FileName);
bool static ExportWiiSave(u64 TitleID);
void static ExportAllSaves();

private:
CWiiSaveCrypted(const char* FileName, u64 TitleID = 0);
~CWiiSaveCrypted();
void ReadHDR();
Expand All @@ -30,33 +35,26 @@ class CWiiSaveCrypted
bool getPaths(bool forExport = false);
void ScanForFiles(std::string savDir, std::vector<std::string>&FilesList, u32 *_numFiles, u32 *_sizeFiles);

private:

AES_KEY m_AES_KEY;
u8 SD_IV[0x10];
std::vector<std::string> FilesList;

char pathData_bin[2048];
std::string encryptedSavePath;

std::string BannerFilePath,
WiiTitlePath;

u8 IV[0x10],
*_encryptedData,
*_data,
md5_file[16],
md5_calc[16];

u32 _bannerSize,
u8 IV[0x10];

u32 //_bannerSize,
_numberOfFiles,
_sizeOfFiles,
_totalSize,
_fileSize,
_roundedfileSize;
_totalSize;

u64 m_TitleID;

bool b_valid,
b_tryAgain;
bool b_valid;

enum
{
Expand Down