mirror of
https://github.com/d0k3/SafeB9SInstaller.git
synced 2025-06-26 05:32:45 +00:00
DevKit compatibility
This commit is contained in:
parent
2e9659e36a
commit
2a8debfef2
@ -1,4 +1,5 @@
|
||||
#include "validator.h"
|
||||
#include "unittype.h"
|
||||
#include "sha.h"
|
||||
|
||||
#define FIRM_MAGIC 'F', 'I', 'R', 'M'
|
||||
@ -30,6 +31,12 @@ const u8 sectorHash[0x20] = {
|
||||
0xBA, 0xB2, 0x4B, 0x4E, 0x5F, 0x65, 0xC9, 0x81, 0xCD, 0x7B, 0xE6, 0xF4, 0x38, 0xE6, 0xD9, 0xD3
|
||||
};
|
||||
|
||||
// from: https://github.com/SciresM/CTRAesEngine/tree/master/CTRAesEngine/Resources/_byte
|
||||
const u8 sectorHash_dev[0x20] = {
|
||||
0xB2, 0x91, 0xD9, 0xB1, 0x33, 0x05, 0x79, 0x0D, 0x47, 0xC6, 0x06, 0x98, 0x4C, 0x67, 0xC3, 0x70,
|
||||
0x09, 0x54, 0xE3, 0x85, 0xDE, 0x47, 0x55, 0xAF, 0xC6, 0xCB, 0x1D, 0x8D, 0xC7, 0x84, 0x5A, 0x64
|
||||
};
|
||||
|
||||
// standard sighax signature hash - still unknown (= missing puzzle piece)
|
||||
const u8 sighaxHash[0x20] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
@ -96,7 +103,7 @@ u32 ValidateFirm(void* firm, u8* firm_sha, u32 firm_size, char* output) {
|
||||
}
|
||||
|
||||
u32 ValidateSector(void* sector) {
|
||||
return (sha_cmp(sectorHash, sector, 0x200, SHA256_MODE) == 0) ? 0 : 1;
|
||||
return (sha_cmp((IS_DEVKIT) ? sectorHash_dev : sectorHash, sector, 0x200, SHA256_MODE) == 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
u32 CheckFirmSigHax(void* firm) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user