From 0c8f7fed6d1c3f55247ea535b2410698fa2db76d Mon Sep 17 00:00:00 2001 From: Charles Lohr Date: Mon, 12 Feb 2007 21:44:07 +0000 Subject: [PATCH] Fix SMOnline Passwords. --- stepmania/src/NetworkSyncManager.cpp | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/stepmania/src/NetworkSyncManager.cpp b/stepmania/src/NetworkSyncManager.cpp index 40026a7ce8..9ef7b7d446 100644 --- a/stepmania/src/NetworkSyncManager.cpp +++ b/stepmania/src/NetworkSyncManager.cpp @@ -827,25 +827,7 @@ void PacketFunctions::ClearPacket() RString NetworkSyncManager::MD5Hex( const RString &sInput ) { - RString HashedName; - RString PreHashedName; - - RString sOutput = BinaryToHex( CryptManager::GetMD5ForString(sInput) ); - - for (int i = 0; i < 16; i++) - PreHashedName += ssprintf( "%2X", sOutput[i] ); - - //XXX: Yuck. Convert spaces to 0's better. (will fix soon) - for (int i = 0; i < 32; i++) - if ( PreHashedName.c_str()[i] == ' ' ) - HashedName += '0'; - else - if ( PreHashedName.c_str()[i]=='\0' ) - HashedName += ' '; - else - HashedName += PreHashedName.c_str()[i]; - - return HashedName; + return BinaryToHex( CryptManager::GetMD5ForString(sInput) ).MakeUpper(); } void NetworkSyncManager::GetListOfLANServers( vector& AllServers )