Getting Whirlpool hashes in PHP -
SeanDenZYR - 19.05.2018
i'm currently using RPUCP by SecretBoss, but i have a problem, i know that this has been asked alot of times but i couldn't find answers in the threads i found over ******.
How do i get passwords via mysql hashed by whirlpool in php?
Re: Getting Whirlpool hashes in PHP -
kovac - 19.05.2018
Код:
hash("whirlpool", $string);
Re: Getting Whirlpool hashes in PHP -
SeanDenZYR - 19.05.2018
i mean how to unhash?
Re: Getting Whirlpool hashes in PHP -
DarkSkull - 19.05.2018
Quote:
Originally Posted by SeanDenZYR
i mean how to unhash?
|
The main point of hashing password is not to be able to unhash it
Re: Getting Whirlpool hashes in PHP -
CodeStyle175 - 19.05.2018
SeanDenZYR you already asked that question, when you got somebodys gamemode with database there isnt no need for you to see others passwords.
when you want to check if players enterd password matches with hashed password in database, you just hash player entered password and compare hashes.
Re: Getting Whirlpool hashes in PHP -
SeanDenZYR - 21.05.2018
Quote:
Originally Posted by CodeStyle175
SeanDenZYR you already asked that question, when you got somebodys gamemode with database there isnt no need for you to see others passwords.
when you want to check if players enterd password matches with hashed password in database, you just hash player entered password and compare hashes.
|
Oh so the whirlpool in SAMP and PHP are the same? ok i get it, thansk!
Re: Getting Whirlpool hashes in PHP -
Kraeror - 21.05.2018
Today I did it, I had the same question, so I found it! Just use Whirlpool and hash password.
Something like this:
At the top of your gamemode:
PHP код:
native WP_Hash(buffer[], len, const str[]);
To your OnPlayerDialog (if your login/register (It's the same in the both- login and register) system is using that else just replace inputtext with the variable you want):
PHP код:
new HashedPassword[129];
WP_Hash(HashedPassword, sizeof(HashedPassword), inputtext);
And you have to use the same hashing method in PHP!
Like this:
PHP код:
$ThePassword = strtoupper(hash("whirlpool", $_POST['Password']));
You have to download Whirlpool plugin firstly!
Re: Getting Whirlpool hashes in PHP -
SeanDenZYR - 21.05.2018
Quote:
Originally Posted by CodeStyle175
SeanDenZYR you already asked that question, when you got somebodys gamemode with database there isnt no need for you to see others passwords.
when you want to check if players enterd password matches with hashed password in database, you just hash player entered password and compare hashes.
|
Quote:
Originally Posted by Kraeror
Today I did it, I had the same question, so I found it! Just use Whirlpool and hash password.
Something like this:
At the top of your gamemode:
PHP код:
native WP_Hash(buffer[], len, const str[]);
To your OnPlayerDialog (if your login/register (It's the same in the both- login and register) system is using that else just replace inputtext with the variable you want):
PHP код:
new HashedPassword[129];
WP_Hash(HashedPassword, sizeof(HashedPassword), inputtext);
And you have to use the same hashing method in PHP!
Like this:
PHP код:
$ThePassword = strtoupper(hash("whirlpool", $_POST['Password']));
You have to download Whirlpool plugin firstly!
|
firstly, understand my post. secondly, my problem is done.