Getting Whirlpool hashes in PHP
#1

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?
Reply
#2

Код:
hash("whirlpool", $string);
Reply
#3

i mean how to unhash?
Reply
#4

Quote:
Originally Posted by SeanDenZYR
Посмотреть сообщение
i mean how to unhash?
The main point of hashing password is not to be able to unhash it
Reply
#5

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.
Reply
#6

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!
Reply
#7

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(HashedPasswordsizeof(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!
Reply
#8

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(HashedPasswordsizeof(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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)