MD5 Hash Problem
#1

Yeah, i must hash my Password 2 times for the Woltlab Md5. But if i do that, Samp give me an other MD5 Hash.

Look :

My First Hash on Server is :
2C89109D42178DE8A367C0228F169BF8


And on Board :
2c89109d42178de8a367c0228f169bf8


If i hash the second time look :

Server :
50f3bfbe3055153c85e8d078a8a5aa2d


Board :
229240afdfde814672dc366efdcbeaec

The Problem are the big Letters, but i cant change them from Big to Little ? Can you help me ?
Reply
#2

You can use strtoupper and wrap it around your encrypt function, like so:

pawn Код:
stock strtoupper(str[]) { /* didn't make this, forum search, credits to whoever did */
    for (new i = 0, j = strlen(str); i < j; i++)
    {
      if (islower(str[i]))
        str[i] -= 32;
    }
}

stock _md5(string[]) {
   new szHash[32];
   strcat(szHash, string, 32);
   strtoupper(szHash);
   return szHash;
}
Note: Untested.
Reply
#3

I dont know what you mean ;b Sorry iam from Germany, how to wrap it ?


Код:
if(!strcmp(MD5_Hash(MD5_Hash(inputtext)), ReturnPasswort(SpielerName), true))
that is my Quellcode now, how to encrypt them now ?

I Use the MD5 Hash Include, and i cant edit them, so i need your help. How to Encrypt now with that Code ?


Is it Posible to edit the md5.inc so , that the include only post little letters?

http://pastebin.com/0yKdjV8E
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)