diff --git a/rpcs3/Crypto/unedat.cpp b/rpcs3/Crypto/unedat.cpp index 03dddf89ce..65641919cb 100644 --- a/rpcs3/Crypto/unedat.cpp +++ b/rpcs3/Crypto/unedat.cpp @@ -457,7 +457,7 @@ void validate_data(const char* file_name, unsigned char *klicensee, NPD_HEADER * else { // Generate klicensee xor key. - xor(key, klicensee, NP_OMAC_KEY_2, 0x10); + xor_(key, klicensee, NP_OMAC_KEY_2, 0x10); // Hash with generated key and compare with dev_hash. dev_hash_result = cmac_hash_compare(key, 0x10, (unsigned char *)npd, 0x60, npd->dev_hash); @@ -529,7 +529,7 @@ bool extract_data(wxFile *input, wxFile *output, const char* input_file_name, un if((EDAT->flags & SDAT_FLAG) == SDAT_FLAG) { ConLog.Warning("EDAT: SDAT detected!\n"); - xor(key, NPD->dev_hash, SDAT_KEY, 0x10); + xor_(key, NPD->dev_hash, SDAT_KEY, 0x10); } else { @@ -670,4 +670,4 @@ int DecryptEDAT(const std::string& input_file_name, const std::string& output_fi input.Close(); output.Close(); return 0; -} \ No newline at end of file +} diff --git a/rpcs3/Crypto/utils.cpp b/rpcs3/Crypto/utils.cpp index 5df31b17e7..13eb434d89 100644 --- a/rpcs3/Crypto/utils.cpp +++ b/rpcs3/Crypto/utils.cpp @@ -20,7 +20,7 @@ u64 swap64(u64 i) ((i & 0x00ff000000000000) >> 40) | ((i & 0xff00000000000000) >> 56); } -void xor(unsigned char *dest, unsigned char *src1, unsigned char *src2, int size) +void xor_(unsigned char *dest, unsigned char *src1, unsigned char *src2, int size) { int i; for(i = 0; i < size; i++) @@ -744,4 +744,4 @@ int lz_decompress(unsigned char *out, unsigned char *in, unsigned int size) delete[] tmp; return result; -} \ No newline at end of file +} diff --git a/rpcs3/Crypto/utils.h b/rpcs3/Crypto/utils.h index 51bc56eba3..0d9e5eed2c 100644 --- a/rpcs3/Crypto/utils.h +++ b/rpcs3/Crypto/utils.h @@ -6,7 +6,7 @@ u16 swap16(u16 i); u32 swap32(u32 i); u64 swap64(u64 i); -void xor(unsigned char *dest, unsigned char *src1, unsigned char *src2, int size); +void xor_(unsigned char *dest, unsigned char *src1, unsigned char *src2, int size); // Hex string conversion auxiliary functions. u64 hex_to_u64(const char* hex_str); @@ -19,4 +19,4 @@ bool hmac_hash_compare(unsigned char *key, int key_len, unsigned char *in, int i bool cmac_hash_compare(unsigned char *key, int key_len, unsigned char *in, int in_len, unsigned char *hash); // Reverse-engineered custom Lempel–Ziv–Markov based compression (unknown variant of LZRC). -int lz_decompress(unsigned char *out, unsigned char *in, unsigned int size); \ No newline at end of file +int lz_decompress(unsigned char *out, unsigned char *in, unsigned int size);