Whirlpool - Hashing Problem
#1

The problem is the inputtext is one character longer than the password coming from the database.
Код:
[20:50:26] input     :   74DFC2B27ACFA364DA55F93A5CAEE29CCAD3557247EDA238831B3E9BD931B01D77FE994E4F12B9D4CFA92A124461D2065197D8CF7F33FC88566DA2DB2A4D6EAE
[20:50:26] PlayerData:   74DFC2B27ACFA364DA55F93A5CAEE29CCAD3557247EDA238831B3E9BD931B01D77FE994E4F12B9D4CFA92A124461D2065197D8CF7F33FC88566DA2DB2A4D6EA
Reply
#2

Is the string that your using to store the hashed password big enough? It should be 129. All I can think of sorry.
Reply
#3

I dont know what you mean. As i understand you try to paste the password in game from the database? If so they don't match.
Reply
#4

I had the same problem, couldnt find any way to fix this.

When you compare the passwords, just change the size you want to compare:

pawn Код:
if( !strcmp( playerdata, inputtext, false, 127 )
Like that it'll cut the last character away
Reply
#5

Thanks, I was thinking of strdel but that didn't work. Thanks, this works. But I'm wondering if it has something to do with StrikenKid's MySQL plugin because I don't get the problem when I use Blue-G's plugin.
By the way, whose plugin are you using?
Reply
#6

Just a note from my side. Why do people use Whirlpool when there are so many hashing functions natively available in MySQL? Yes, I know that people complain that MD5 and SHA1 have certain flaws in it, but it should suffice for what you're doing.

If you do really care about someone hacking into your database, you can add a unique salt to the password. For example, something like this would be uncrackable, or it would take a very long time to crack it.

pawn Код:
sha1(concat(sha1('mypassword'), sha1('&$Ј?')))
Where '&$Ј?' is replaced with a unique random salt for each player.
Reply
#7

Quote:
Originally Posted by Vince
Посмотреть сообщение
Just a note from my side. Why do people use Whirlpool when there are so many hashing functions natively available in MySQL? Yes, I know that people complain that MD5 and SHA1 have certain flaws in it, but it should suffice for what you're doing.

If you do really care about someone hacking into your database, you can add a unique salt to the password. For example, something like this would be uncrackable, or it would take a very long time to crack it.

pawn Код:
sha1(concat(sha1('mypassword'), sha1('&$Ј?')))
Where '&$Ј?' is replaced with a unique random salt for each player.
Quick question, i don't know much about MySQL or SQLite. But is there a native hashing feature for SQLite? Since i am currently scripting a client's gamemode with an SQLite saving system and i wanted to know before i use Whirlpool or similar hashing techniques. And if there is a native way, can you please give me an example.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)