From 63049ed8d425fd52d55c81905bc02b88ba344edd Mon Sep 17 00:00:00 2001 From: yutaka Date: Tue, 20 May 2008 04:09:39 +0000 Subject: [PATCH] =?UTF-8?q?Phase2Ex=E7=94=A8=E3=83=86=E3=82=B9=E3=83=88?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1415 b08762b0-b915-fc4b-9d8c-17b2551a87ff --- build/tests/CheckDSHashTable/src/main.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/build/tests/CheckDSHashTable/src/main.c b/build/tests/CheckDSHashTable/src/main.c index d005db49..bb73c028 100644 --- a/build/tests/CheckDSHashTable/src/main.c +++ b/build/tests/CheckDSHashTable/src/main.c @@ -71,6 +71,15 @@ static BOOL ReadImage(void* dest, s32 offset, s32 length, void* arg) } return TRUE; } +static BOOL ReadImageEx(SVCHMACSHA1Context* ctx, s32 offset, s32 length, void* arg) +{ + if ( !ReadImage(p2work.buffer, offset, length, arg) ) + { + return FALSE; + } + DHT_CheckHashPhase2ExUpdate(ctx, p2work.buffer, length); + return TRUE; +} #else #ifdef SDK_ARM9 #define PAGE_SIZE 512 @@ -187,6 +196,12 @@ static BOOL CheckValidation(FSFile* fp) return FALSE; } + // ハッシュ計算 (2ex) - 隠蔽は難しいか + if ( !DHT_CheckHashPhase2Ex(db->hash[1], &rom_header, (DHTPhase2ExWork*)&p2work, ReadImage, ReadImageEx, fp) ) + { + return FALSE; + } + return TRUE; }