How to decrypt Hash Password in Laravel

后端 未结 2 1535
[愿得一人]
[愿得一人] 2021-02-13 01:40

I have google this alot, but unfortunatilty found no working solution.

I know its a bad technique, but I need to send user its password by email.

I have manage

2条回答
  •  广开言路
    2021-02-13 02:16

    Short answer is that you don't 'decrypt' the password (because it's not encrypted - it's hashed).

    The long answer is that you shouldn't send the user their password by email, or any other way. If the user has forgotten their password, you should send them a password reset email, and allow them to change their password on your website.

    Laravel has most of this functionality built in (see the Laravel documentation - I'm not going to replicate it all here. Also available for versions 4.2 and 5.0 of Laravel).

    For further reading, check out this 'blogoverflow' post: Why passwords should be hashed.

提交回复
热议问题