d0k3 d35e03f1a3 Allow loading the 0x05keyY from aeskeydb.bin
... also searchin /Decrypt9 folder
2016-04-06 02:59:57 +02:00

25 lines
715 B
C

#pragma once
#include "common.h"
#define NAND_UNKNOWN 0
#define NAND_SYSNAND (1<<0)
#define NAND_EMUNAND (1<<1)
#define NAND_IMGNAND (1<<2)
#define NAND_TYPE_O3DS (1<<3)
#define NAND_TYPE_N3DS (1<<4)
#define NAND_TYPE_NO3DS (1<<5)
bool LoadKeyFromFile(const char* folder, u8* keydata, u32 keyslot, char type, char* id);
bool InitNandCrypto(void);
bool CheckSlot0x05Crypto(void);
void CryptNand(u8* buffer, u32 sector, u32 count, u32 keyslot);
int ReadNandSectors(u8* buffer, u32 sector, u32 count, u32 keyslot, u32 src);
int WriteNandSectors(const u8* buffer, u32 sector, u32 count, u32 keyslot, u32 dest);
u64 GetNandSizeSectors(u32 src);
u8 CheckNandType(u32 src);
bool InitEmuNandBase(void);