MD5 Hash Problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: MD5 Hash Problem (
/showthread.php?tid=255435)
MD5 Hash Problem -
Xivop. - 15.05.2011
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 ?
Re: MD5 Hash Problem -
__ - 16.05.2011
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.
Re: MD5 Hash Problem -
Xivop. - 16.05.2011
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