mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 06:51:26 +12:00
Fixed compilation errors.
This commit is contained in:
parent
4978af50e4
commit
faeedf1355
3 changed files with 5 additions and 5 deletions
|
@ -620,7 +620,7 @@ int validate_npd_hashes(const char* file_name, unsigned char *klicensee, NPD_HEA
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Generate klicensee xor key.
|
// Generate klicensee xor key.
|
||||||
xor(key, klicensee, NP_OMAC_KEY_2, 0x10);
|
xor_key(key, klicensee, NP_OMAC_KEY_2, 0x10);
|
||||||
|
|
||||||
// Hash with generated key and compare with dev_hash.
|
// Hash with generated key and compare with dev_hash.
|
||||||
dev_hash_result = cmac_hash_compare(key, 0x10, dev, 0x60, npd->dev_hash, 0x10);
|
dev_hash_result = cmac_hash_compare(key, 0x10, dev, 0x60, npd->dev_hash, 0x10);
|
||||||
|
@ -699,7 +699,7 @@ bool extract_data(rFile *input, rFile *output, const char* input_file_name, unsi
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate SDAT key.
|
// Generate SDAT key.
|
||||||
xor(key, NPD->dev_hash, SDAT_KEY, 0x10);
|
xor_key(key, NPD->dev_hash, SDAT_KEY, 0x10);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,7 +26,7 @@ u64 swap64(u64 i)
|
||||||
((i & 0x00ff000000000000) >> 40) | ((i & 0xff00000000000000) >> 56);
|
((i & 0x00ff000000000000) >> 40) | ((i & 0xff00000000000000) >> 56);
|
||||||
}
|
}
|
||||||
|
|
||||||
void xor(unsigned char *dest, unsigned char *src1, unsigned char *src2, int size)
|
void xor_key(unsigned char *dest, unsigned char *src1, unsigned char *src2, int size)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for(i = 0; i < size; i++)
|
for(i = 0; i < size; i++)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
// Licensed under the terms of the GNU GPL, version 3
|
// Licensed under the terms of the GNU GPL, version 3
|
||||||
// http://www.gnu.org/licenses/gpl-3.0.txt
|
// http://www.gnu.org/licenses/gpl-3.0.txt
|
||||||
|
|
||||||
#define MAX_PATH _MAX_PATH
|
#define MAX_PATH 4096
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "aes.h"
|
#include "aes.h"
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
u16 swap16(u16 i);
|
u16 swap16(u16 i);
|
||||||
u32 swap32(u32 i);
|
u32 swap32(u32 i);
|
||||||
u64 swap64(u64 i);
|
u64 swap64(u64 i);
|
||||||
void xor(unsigned char *dest, unsigned char *src1, unsigned char *src2, int size);
|
void xor_key(unsigned char *dest, unsigned char *src1, unsigned char *src2, int size);
|
||||||
void prng(unsigned char *dest, int size);
|
void prng(unsigned char *dest, int size);
|
||||||
char* extract_file_name(const char* file_path, char real_file_name[MAX_PATH]);
|
char* extract_file_name(const char* file_path, char real_file_name[MAX_PATH]);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue