mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Some clean up
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3377 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -19,7 +19,6 @@
|
||||
|
||||
#include "pluginspecs_wiimote.h"
|
||||
#include "Common.h"
|
||||
#include "Logging.h" // for startConsoleWin, Console::Print, GetConsoleHwnd
|
||||
#include "Encryption.h"
|
||||
|
||||
|
||||
@ -247,9 +246,7 @@ void gentabs(u8 *rand, u8 *key, u8 idx, u8 *ft, u8 *sb)
|
||||
|
||||
|
||||
|
||||
// ===================================================
|
||||
/* Generate key from the 0x40-0x4c data in g_RegExt */
|
||||
// ----------------
|
||||
void wiimote_gen_key(wiimote_key *key, u8 *keydata)
|
||||
{
|
||||
u8 rand[10];
|
||||
@ -283,9 +280,7 @@ void wiimote_gen_key(wiimote_key *key, u8 *keydata)
|
||||
}
|
||||
|
||||
|
||||
// ===================================================
|
||||
/* Encrypt data */
|
||||
// ----------------
|
||||
void wiimote_encrypt(wiimote_key *key, u8 *data, int addr, u8 len)
|
||||
{
|
||||
for(int i = 0; i < len; i++, addr++)
|
||||
@ -293,11 +288,9 @@ void wiimote_encrypt(wiimote_key *key, u8 *data, int addr, u8 len)
|
||||
}
|
||||
|
||||
|
||||
// ===================================================
|
||||
/* Decrypt data */
|
||||
// ----------------
|
||||
void wiimote_decrypt(wiimote_key *key, u8 *data, int addr, u8 len)
|
||||
{
|
||||
for(int i = 0; i < len; i++, addr++)
|
||||
data[i] = (data[i] ^ key->sb[addr%8]) + key->ft[addr%8];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user