How to implement temporary password logic?

I want to implement a logic similar to what some of the websites do, as they ask for your email address and send you a link to that email address when you click on this link that you redirect to home and provide a temporary password which expires and asks you to set a new password.

I am interested in understanding the logic of generating temporary passwords, storing them, maintaining their security, and expiring them. I have no language preference. but I am well versed in java and php examples. please suggest.

+3
source share
2 answers

- MD5 , .

$name = "sushil bharwani";
$email = "sushil@example.com";
$pass = md5($name . $email);

1f3870be274f6c49b3e31a0c6728957f. MD5 , , -, , , , , , MD5, . , md5, , - , - .

, / , . , , . , , .

, , , , - , , .

, , , cronjob , x , .

+2

, -, , , , .

, , , . , , , , . . , , , .

, , , . , , , . , .

, script, , , , , .

, . , !

+1

Source: https://habr.com/ru/post/1771138/


All Articles