@ershakti Passwords are hashed, not encrypted. That means they can’t be reversed into their plain text form. This is for security reasons.
If someone downloads your database, they shouldn’t be able to reverse each of your users’ passwords. It’s also a security issue to simply display a password back to the user in case they’re on an insecure network and someone is eavesdropping on the connection.
If you need to display a password, then you’re doing something wrong.
@martinbean actually as per application requirement whenever users try forget password then we have to email them there password ,not reset password link
@ershakti If a user forgets their password they should reset it, not have their current one emailed to them. As mentioned, this is a really bad practice from a security point of view, as if someone gets access to one of your website users’ inbox, they can just request their password.
Lots of people use the same password for multiple services, so if they have a password for the user’s account on your website, then they may have used the same password for their online banking account or other sensitive services. So you can see why sending passwords in plain text is a bad idea.
I have some different requirement, i don't want to decode the password, but i am building some other app based on SAME DATABASE for LOGIN so what i can do to "encrypt the password value so that it matches the backend password encrypted code".
if you have seen the thread then you wouldnt have asked this q. if you really must do encrypt/decrypt then create your own login/reset which does what you want but it will be insecure