VolumeCreator: Make master key arrays static
Only used within this translation unit.
This commit is contained in:
parent
18c81dbc33
commit
00b3cc3b09
|
@ -59,8 +59,15 @@ private:
|
||||||
IBlobReader& m_rReader;
|
IBlobReader& m_rReader;
|
||||||
};
|
};
|
||||||
|
|
||||||
const unsigned char g_MasterKey[16] = {0xeb,0xe4,0x2a,0x22,0x5e,0x85,0x93,0xe4,0x48,0xd9,0xc5,0x45,0x73,0x81,0xaa,0xf7};
|
static const unsigned char s_master_key[16] = {
|
||||||
const unsigned char g_MasterKeyK[16] = {0x63,0xb8,0x2b,0xb4,0xf4,0x61,0x4e,0x2e,0x13,0xf2,0xfe,0xfb,0xba,0x4c,0x9b,0x7e};
|
0xeb,0xe4,0x2a,0x22,0x5e,0x85,0x93,0xe4,
|
||||||
|
0x48,0xd9,0xc5,0x45,0x73,0x81,0xaa,0xf7
|
||||||
|
};
|
||||||
|
|
||||||
|
static const unsigned char s_master_key_korean[16] = {
|
||||||
|
0x63,0xb8,0x2b,0xb4,0xf4,0x61,0x4e,0x2e,
|
||||||
|
0x13,0xf2,0xfe,0xfb,0xba,0x4c,0x9b,0x7e
|
||||||
|
};
|
||||||
|
|
||||||
static IVolume* CreateVolumeFromCryptedWiiImage(IBlobReader& _rReader, u32 _PartitionGroup, u32 _VolumeType, u32 _VolumeNum, bool Korean);
|
static IVolume* CreateVolumeFromCryptedWiiImage(IBlobReader& _rReader, u32 _PartitionGroup, u32 _VolumeType, u32 _VolumeNum, bool Korean);
|
||||||
EDiscType GetDiscType(IBlobReader& _rReader);
|
EDiscType GetDiscType(IBlobReader& _rReader);
|
||||||
|
@ -195,7 +202,7 @@ static IVolume* CreateVolumeFromCryptedWiiImage(IBlobReader& _rReader, u32 _Part
|
||||||
usingKoreanKey = true;
|
usingKoreanKey = true;
|
||||||
|
|
||||||
aes_context AES_ctx;
|
aes_context AES_ctx;
|
||||||
aes_setkey_dec(&AES_ctx, (usingKoreanKey ? g_MasterKeyK : g_MasterKey), 128);
|
aes_setkey_dec(&AES_ctx, (usingKoreanKey ? s_master_key_korean : s_master_key), 128);
|
||||||
|
|
||||||
u8 VolumeKey[16];
|
u8 VolumeKey[16];
|
||||||
aes_crypt_cbc(&AES_ctx, AES_DECRYPT, 16, IV, SubKey, VolumeKey);
|
aes_crypt_cbc(&AES_ctx, AES_DECRYPT, 16, IV, SubKey, VolumeKey);
|
||||||
|
|
Loading…
Reference in New Issue