AnsweredAssumed Answered

convert password to its value in user_hash column

Question asked by Asaf Army on Apr 11, 2014
Latest reply on Jun 4, 2015 by Xtream Xtream
i receive a user and password in an entrypoint and i want to check that the password is valid. 
i read alot of posts about it and i know i need to perform some kind of salted crypt() on the password in order to compare it with the "user_hash" value in Users Table.

the password is "asaf1029"
and the value in "user_hash" column of this user is "$1$VinuRCTI$FR1xAJS1.vKRqmm9Uuor41"

i can't seem to find a way to convert the password to the "user_hash" value in order to compare it and to confirm the password is ok. i tried all the following but nothing gives me the value of "$1$VinuRCTI$FR1xAJS1.vKRqmm9Uuor41":

$hashedPassword = md5($password);
$hashedPassword =crypt(md5($password));
$hashedPassword = crypt($password);
$hashedPassword = md5(crypt($password));

Can anyone please help me? 
how can i convert the password to its user_hash value?

Outcomes