mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
(更新者)akabane_jumpei カードデータのARM9常駐モジュール先頭2KBの暗号化領域を復号化対応のヘッダ追加忘れ2...
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@315 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
927c813489
commit
84c7f218b5
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
// Function Prototype -------------------------------------------------------
|
// Function Prototype -------------------------------------------------------
|
||||||
static u32 F(const BLOWFISH_CTX *ctx, u32 x);
|
static u32 F(const BLOWFISH_CTX *ctx, u32 x);
|
||||||
static void GCDi_InitBlowfishKeyAndTableDS(BLOWFISH_CTX *ctx, u32 *keyBufp, s32 keyLen);
|
//static void GCDi_InitBlowfishKeyAndTableDS(BLOWFISH_CTX *ctx, u32 *keyBufp, s32 keyLen);
|
||||||
|
|
||||||
//*****************************************
|
//*****************************************
|
||||||
//
|
//
|
||||||
@ -36,7 +36,7 @@ void GCDm_MakeBlowfishTableDS(BLOWFISH_CTX *tableBufp, ROM_Header_Short *rhs, u3
|
|||||||
keyBufp[1] = *(u32 *)rhs->game_code >> 1;
|
keyBufp[1] = *(u32 *)rhs->game_code >> 1;
|
||||||
keyBufp[2] = *(u32 *)rhs->game_code << 1;
|
keyBufp[2] = *(u32 *)rhs->game_code << 1;
|
||||||
|
|
||||||
GCDi_InitBlowfishKeyAndTableDS(tableBufp, keyBufp, keyLen);
|
InitBlowfishKeyAndTableDS(tableBufp, keyBufp, keyLen);
|
||||||
|
|
||||||
blowfishedKey[0] = (u32)rhs->ctrl_reserved_B[0];
|
blowfishedKey[0] = (u32)rhs->ctrl_reserved_B[0];
|
||||||
blowfishedKey[1] = *(u32 *)&rhs->ctrl_reserved_B[4];
|
blowfishedKey[1] = *(u32 *)&rhs->ctrl_reserved_B[4];
|
||||||
@ -45,15 +45,15 @@ void GCDm_MakeBlowfishTableDS(BLOWFISH_CTX *tableBufp, ROM_Header_Short *rhs, u3
|
|||||||
|
|
||||||
DecryptByBlowfish(tableBufp, &(blowfishedKey)[1], &(blowfishedKey)[0]);
|
DecryptByBlowfish(tableBufp, &(blowfishedKey)[1], &(blowfishedKey)[0]);
|
||||||
|
|
||||||
GCDi_InitBlowfishKeyAndTableDS(tableBufp, keyBufp, keyLen);
|
InitBlowfishKeyAndTableDS(tableBufp, keyBufp, keyLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************
|
//*****************************************
|
||||||
//
|
//
|
||||||
// GCDi_InitBlowfishKeyAndTableDSŠÖ<EFBFBD>”
|
// InitBlowfishKeyAndTableDSŠÖ<EFBFBD>”
|
||||||
//
|
//
|
||||||
//*****************************************
|
//*****************************************
|
||||||
static void GCDi_InitBlowfishKeyAndTableDS(BLOWFISH_CTX *ctx, u32 *keyBufp, s32 keyLen)
|
void InitBlowfishKeyAndTableDS(BLOWFISH_CTX *ctx, u32 *keyBufp, s32 keyLen)
|
||||||
{
|
{
|
||||||
EncryptByBlowfish(ctx, &(keyBufp)[2], &(keyBufp)[1]);
|
EncryptByBlowfish(ctx, &(keyBufp)[2], &(keyBufp)[1]);
|
||||||
EncryptByBlowfish(ctx, &(keyBufp)[1], &(keyBufp)[0]);
|
EncryptByBlowfish(ctx, &(keyBufp)[1], &(keyBufp)[0]);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user